Welcome to Qi-U Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
238 views
in Technique[技术] by (71.8m points)

Vue里,element UI 是可以在main.js 或者router.js里引入吗?

Vue里,element UI 在main.js 或者router.js引入都可以吗?有什么区别吗?谢谢


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)

只要在vue实例化之前Vue.use(ElementUI)即可
通常router.js也会引入到main.js注入实例,所以虽然这样写有点奇怪,但实际上是没有问题的。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Qi-U Community for programmer and developer-Open, Learning and Share
...