Vue.use() is a static method that Vue provides to register plug-ins with Vue. We can also register global components in the form of plug-ins for unified management and use
-
- Vue.use can receive an object, vue.use (obj)
-
- The install function needs to be provided in the
-
- The install function is automatically called when vue.use (obj) is passed in the Vue constructor
Specific use steps
Install () : SRC /componets/index.js
2. Register the plug-in in main.js