Commit e4215917fcf95e940ce836f0611cef09e849d8c5

Authored by Lawrence
1 parent 3bbb39d7

增加前端Notify支持

Showing 1 changed file with 3 additions and 0 deletions
web_src/src/main.js
@@ -9,10 +9,13 @@ import VueCookies from 'vue-cookies'; @@ -9,10 +9,13 @@ import VueCookies from 'vue-cookies';
9 import echarts from 'echarts'; 9 import echarts from 'echarts';
10 10
11 import VueClipboard from 'vue-clipboard2' 11 import VueClipboard from 'vue-clipboard2'
  12 +import { Notification } from 'element-ui';
  13 +
12 Vue.use(VueClipboard) 14 Vue.use(VueClipboard)
13 Vue.use(ElementUI); 15 Vue.use(ElementUI);
14 Vue.use(VueCookies); 16 Vue.use(VueCookies);
15 Vue.prototype.$axios = axios; 17 Vue.prototype.$axios = axios;
  18 +Vue.prototype.$notify = Notification;
16 19
17 axios.defaults.baseURL = (process.env.NODE_ENV === 'development') ? process.env.BASE_API : ""; 20 axios.defaults.baseURL = (process.env.NODE_ENV === 'development') ? process.env.BASE_API : "";
18 21