提交 81ea735e 编写于 作者: Q qiang

fix: 修复 app-v3 自定义组件 id 未同步到 view 层的问题

上级 52dda55d
......@@ -10,10 +10,10 @@ const {
module.exports = function parseComponent (el) {
// 需要把自定义组件的 attrs, props 全干掉
if (el.tag && isComponent(el.tag)) {
// 仅保留 ID
// 仅保留 id、ID、data
el.attrs && (el.attrs = el.attrs.filter(attr => {
const name = attr.name
return name === ID || name.indexOf('data-') === 0
return name === 'id' || name === ID || name.indexOf('data-') === 0
}))
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册