2

实际上我正在制作一个购物应用程序,其中有一种情况,例如假设(我们有 3 个页面,一个是 Home,第二个是 Single-Product,第三个是 Size-Chart)所以当我在主页时选择产品我重定向到 Single-Product 页面,然后在其中它们是按钮调用 SHOW SIZE CHART 当我单击它时应该向我显示 Size-Char 页面,但我得到了如下错误

Vue warn]: Error in directive view inserted hook: "Error: View already has a parent. View: ActionBar(336) Parent: Page(335)"
JS: 
JS: found in
JS: 
JS: ---> <ActionBar>
JS:        <Page>
JS:          <Anonymous>
JS:            <NavigationEntry>
JS: [Vue warn]: Error in v-on handler: "Error: View already has a parent. View: ActionBar(336) Parent: Page(335)"

我使用相同的波纹管代码从主页重定向到单一产品页面,但我在 Single_Product 页面中使用相同的代码并转移到尺寸图表页面它不起作用

主页中要重定向的代码

methods:{
            sendToSingleProduct(component,productId){
                this.$navigateTo(component, {
                    props: {
                        ProductId: productId
                    },
                    clearHistory: false
                });
            }
}

我在单一产品页面中使用的代码不起作用

methods:{
            sendToSizeChart(component){
                this.$navigateTo(component, {
                    props: {
                        ProductId: this.productId
                    },
                    clearHistory: false
                });
            }
}

提前致谢

4

0 回答 0