Head.vue
methods: {
onlineCustom() {
// 兄弟传参
this.$root.$emit("openPopupKefu", true);
},
}
PopupKefu.vue
mounted() {
// 兄弟接收参数
this.$root.$on("openPopupKefu", (bol) => {
this.isShow = bol;
});
}
Head.vue
methods: {
onlineCustom() {
// 兄弟传参
this.$root.$emit("openPopupKefu", true);
},
}
PopupKefu.vue
mounted() {
// 兄弟接收参数
this.$root.$on("openPopupKefu", (bol) => {
this.isShow = bol;
});
}