fix attr merging

This commit is contained in:
Evan You 2016-04-15 15:35:47 -04:00
parent b6a1db88b8
commit 054c2c3de2

View File

@ -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]
}
}
}