mirror of
https://github.com/vuejs/vue.git
synced 2024-11-22 04:39:46 +00:00
fix attr merging
This commit is contained in:
parent
b6a1db88b8
commit
054c2c3de2
@ -42,9 +42,10 @@ function resolveSlots (vm, children) {
|
||||
function mergeParentAttrs (vm, data, parentData) {
|
||||
if (parentData.attrs) {
|
||||
const props = vm.$options.props
|
||||
const attrs = data.attrs || (data.attrs = [])
|
||||
for (let key in parentData.attrs) {
|
||||
if (!hasOwn(props, key)) {
|
||||
data.attrs[key] = parentData.attrs[key]
|
||||
attrs[key] = parentData.attrs[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user