提交 b5b0e409 编写于 作者: D DCloud_LXH

fix: rich-text 添加 scopeId 错误 question/144042

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