一:全域參考
1,現在main中參考組件:
import 組件別名 from '組件路徑'
2.注冊組件
Vue.component('組件別名', 組件別名)

1.在需要參考組件的頁面中script下寫如下代碼
import 組件別名 from "組件路徑";
2.注冊組件 components:{組件別名}

轉載自:https://blog.csdn.net/qq_31544819/article/details/118901723
本文來自博客園,作者:.net&new,轉載請注明原文鏈接:https://www.cnblogs.com/wugh8726254/p/17185296.html
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/545979.html
標籤:其他
