提交 2aaa1cf9 编写于 作者: fxy060608's avatar fxy060608

fix(v3): Component with id #1758

上级 6f5d4925
......@@ -80,7 +80,7 @@ function parseComponentAttrs (el, genVar) {
name,
value
} = attr
if (name.indexOf('data-') === 0) {
if (isVar(value) && (name === 'id' || name.indexOf('data-') === 0)) {
attr.value = genVar('a-' + name, value)
}
})
......@@ -105,8 +105,8 @@ function checkAutoFill (el) {
}
function transformNode (el, parent, state, isScopedSlot) {
if (el.type === 3) {
// fixed by xxxxxx 注意:保持平台一致性,trim 一下,理论上service不需要,保险起见也处理一遍
if (el.type === 3) {
// fixed by xxxxxx 注意:保持平台一致性,trim 一下,理论上service不需要,保险起见也处理一遍
el.text = el.text.trim()
return
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册