Selaa lähdekoodia

Merge branch 'master' of http://47.92.161.104:10080/shuzhan/shinestar-portal

yanliming 4 vuotta sitten
vanhempi
commit
e9cd3a36d3
2 muutettua tiedostoa jossa 20 lisäystä ja 0 poistoa
  1. 1 0
      .env.test
  2. 19 0
      src/main.js

+ 1 - 0
.env.test

@@ -1,3 +1,4 @@
+NODE_ENV=production
 OUT_PUT_DIR=dist/shinestar-portal
 
 #VUE_APP_BACKEND_URL=http://wisdomhouse.sudaonline.net

+ 19 - 0
src/main.js

@@ -6,6 +6,7 @@ import echarts from 'echarts'
 import './plugins/element.js'
 import AxiosPlugin from './plugins/AxiosPlugin'
 import './assets/iconfont/iconfont.css'
+import { Message } from 'element-ui'
 
 import AMap from "vue-amap"
 
@@ -23,6 +24,24 @@ AMap.initAMapApiLoader({
 
 Vue.prototype.$echarts = echarts
 
+var MY_MESSAGE_DEFAULT = {
+  showClose: true
+}
+ 
+var MessageWrapper = function (options) {
+  if (typeof (options) === 'object') {
+    options = Object.assign({}, MY_MESSAGE_DEFAULT, options)
+  }
+
+  return Message(options)
+}
+
+for(var key in Message){
+  MessageWrapper[key] = Message[key]
+}
+
+Vue.prototype.$message = MessageWrapper
+
 new Vue({
   router,
   store,