Usually, the components used by our applet need to be declared in the json file of the page corresponding to the component used,
but we may have some components that use Vue in many places and have Vue.use (component);
we can set it in app.json in the root directory of the applet usingComponents attribute to complete
the reference code as follows
"usingComponents": {
"index-text": "./components/indexText"
},
In this way, he will set up a public component
, and then we will delete the json configuration in the original page.
After recompiling, we will find that the component can still be used normally
, so he will set up a global public component of the project.