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) => {