From b5b0e40972302e2f5e864d42342959b66874e900 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Thu, 28 Apr 2022 17:09:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20rich-text=20=E6=B7=BB=E5=8A=A0=20scopeId?= =?UTF-8?q?=20=E9=94=99=E8=AF=AF=20question/144042?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-components/src/vue/rich-text/nodes-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/uni-components/src/vue/rich-text/nodes-parser.js b/packages/uni-components/src/vue/rich-text/nodes-parser.js index 505e0a441..f82db4872 100644 --- a/packages/uni-components/src/vue/rich-text/nodes-parser.js +++ b/packages/uni-components/src/vue/rich-text/nodes-parser.js @@ -124,6 +124,7 @@ export default function parseNodes( if (!elem) { return } + scopeId && elem.setAttribute(scopeId, '') const attrs = node.attrs if (isPlainObject(attrs)) { const tagAttrs = TAGS[tagName] || [] @@ -135,7 +136,6 @@ export default function parseNodes( Array.isArray(value) && (value = value.join(' ')) case 'style': elem.setAttribute(name, value) - scopeId && elem.setAttribute(scopeId, '') break default: if (tagAttrs.indexOf(name) !== -1) { -- GitLab