1. Find the cause of the problem: Since the vue.use (Message) component is used when importing on demand so that a blank Message prompt pops up on each refresh (this can only be caused when importing local plug-ins) :

2. Solve the problem: Import vue.use (Message) to vue.component (Message) by loading components. Or just don’t use Vue.component(). Just import and mount.

import Vue from 'vue';

Vue.component(Message)

Vue.prototype.$message = Message;
Copy the code

Note:

1. Component is the business module that makes up your App. Its target is app.vue.

2. Plugins are functional modules that enhance your technology stack and target the Vue itself.