now you want the method of the current page to be used on another page. You can"t see the $emit and $on method transfer calls on the official website
.
1. Create a new file for event.js
import Vue from "vue"
export let Event = new Vue()
export let KEY = "search"
2. In the current page reference, the full method is defined in methods. I don"t know how to send this method, and then how to receive
on other pages.import { Event, KEY } from "../../utils/event.js";
Event.$emit(KEY, this.full());
3. For other pages, I don"t know how to receive the method
Event.$on(KEY, function() {});