From fd200d547220f4f2cea5f9405ffb00a61d89f54b Mon Sep 17 00:00:00 2001 From: chenxi-20 <2465950588@qq.com> Date: Sun, 3 Sep 2023 19:49:06 -0700 Subject: [PATCH] fix(mobile-tabbar): fixed a tabbar component switchover issue on the mobile client --- packages/renderless/src/tabbar-item/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/renderless/src/tabbar-item/index.ts b/packages/renderless/src/tabbar-item/index.ts index b45457efc0..a98cc8bea2 100644 --- a/packages/renderless/src/tabbar-item/index.ts +++ b/packages/renderless/src/tabbar-item/index.ts @@ -27,7 +27,7 @@ export const getRouteActive = export const onClick = ({ api, emit, parent, props, router, state }) => () => { - parent.$parent.onChange(props.name || parent.index || state.index) + parent.onChange(props.name || parent.index || state.index) emit('click', event) @@ -35,11 +35,11 @@ export const onClick = } export const bindChildren = (parent) => () => { - if (!parent.$parent) { + if (!parent) { return } - parent.$parent.state.children = parent.$parent.getChildrens() + parent.state.children = parent.getChildrens() } export const routeTab = (props, state) => (router) => {