1.Introduce the file element.js on demand
Note: Just introduce the Message and MessageBox components, and alert is included in the MessageBox.
I introduced the Alert component before and found that it didn't work
2. Register the pseudo name in the vue prototype
3. Just call it directly in the component.
4.Achieve results
I found that there is a bug when elementui calls the pop-up box. Once the MessageBox component is introduced, after using Vue.use(MessageBox), an empty window exception will pop up after loading the page.
The reason is that I wrote this extra code
It will be normal if you comment it out