src/layout/components/AppMain.vue
@@ -1,7 +1,7 @@ <template> <section class="app-main"> <transition name="fade-transform" mode="out-in"> <router-view :key="key" /> <router-view ref="child" @triggerMainBtnPlan="triggerMainBtnPlan" :key="key" /> </transition> </section> </template> @@ -13,6 +13,14 @@ key() { return this.$route.path } }, methods: { childMethod(){ this.$refs.child.combackLookPlan() }, triggerMainBtnPlan(){ this.$parent.triggerCombackBtn() } } } </script>