common.js will have many functions that I define myself, such as:
export function a(){
//
}
export function b(){
//
}
export function c(){
//
}
I will quote him in ad.vue:
import {a} from "@/assets/js/common.js"
I will quote him in role.vue:
import {b} from "@/assets/js/common.js"
N pages need to use functions in common.js. It"s troublesome for me to quote them one by one. Is there a good solution?
< hr >I tried to introduce common in main.js
import "@/assets/js/common.js"
but this method does not work, it will prompt XX is not defined