引入
import Vue from 'vue';
import ElementUI from 'element-ui';
一般.vue頁面我們是這樣寫
但是在js裏面
ElementUI.Notification({
title: '警告',
message: '這是一條警告的提示消息',
type: 'warning'
});
ElementUI.Message 對應的是this.$message方法
ElementUI.Notification 對應的是this.$notify方法
ElementUI.MessageBox 對應的是this.$alert方法