1、在untils文件夹在新建aa.js
2、js中写
export const fun={
方法xxxxxxx
}
3、在需要用到的页面引入
import { fun} from “@/utils/aa”
4、自定义指令
Vue.directive(“name”, fun);
1、在untils文件夹在新建aa.js
2、js中写
export const fun={
方法xxxxxxx
}
3、在需要用到的页面引入
import { fun} from “@/utils/aa”
4、自定义指令
Vue.directive(“name”, fun);