提交 249b49e5 编写于 作者: D DCloud_LXH

fix: rich-text 添加 scopeId 错误

上级 58909825
......@@ -120,6 +120,7 @@ export default function parseNodes (nodes, parentNode, scopeId, triggerItemClick
return
}
const attrs = node.attrs
scopeId && elem.setAttribute(scopeId, '')
if (isPlainObject(attrs)) {
const tagAttrs = TAGS[tagName] || []
Object.keys(attrs).forEach(function (name) {
......@@ -130,7 +131,6 @@ export default function parseNodes (nodes, parentNode, scopeId, triggerItemClick
Array.isArray(value) && (value = value.join(' '))
case 'style':
elem.setAttribute(name, value)
scopeId && elem.setAttribute(scopeId, '')
break
default:
if (tagAttrs.indexOf(name) !== -1) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册