From ce1aeb5701baa8c68b13ec94e07e6f0b3eeddaad Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Mon, 7 Mar 2022 10:37:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20rich-text=E3=80=81navigator=20scopeId=20?= =?UTF-8?q?question/140644?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-components/src/vue/navigator/index.tsx | 2 +- packages/uni-components/src/vue/rich-text/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/uni-components/src/vue/navigator/index.tsx b/packages/uni-components/src/vue/navigator/index.tsx index c2d79c6de..17b435989 100644 --- a/packages/uni-components/src/vue/navigator/index.tsx +++ b/packages/uni-components/src/vue/navigator/index.tsx @@ -17,7 +17,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({ props: navigatorProps, setup(props, { slots }) { const vm = getCurrentInstance() - const __scopeId = (vm && (vm.root.type as any).__scopeId) || '' + const __scopeId = (vm && vm.vnode.scopeId) || '' const { hovering, binding } = useHover(props) const onClick = createNavigatorOnClick(props) diff --git a/packages/uni-components/src/vue/rich-text/index.tsx b/packages/uni-components/src/vue/rich-text/index.tsx index a30965983..8406b4f5e 100644 --- a/packages/uni-components/src/vue/rich-text/index.tsx +++ b/packages/uni-components/src/vue/rich-text/index.tsx @@ -38,7 +38,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({ const nodeList = parseNodes( nodes, document.createDocumentFragment(), - (vm && (vm.root.type as any)).__scopeId || '', + (vm && vm.vnode.scopeId) || '', hasItemClick && triggerItemClick ) rootRef.value!.firstElementChild!.innerHTML = '' -- GitLab