We first introduce a third-party UI library.
Here we take elementUI as an example
and introduce dependencies first.
npm install element-ui --save
Then introduce it in the main.js entry file
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)
Then use it in your component
this.$notify({
title: '提示',
message: '这是一条通知消息',
type: 'success'
})
A beautiful prompt will appear on the right side of the page.