mirror of
https://gitee.com/vuejs/vue.git
synced 2024-12-02 03:57:36 +08: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