hejianhao
2025-04-07 1bf074bf5703c93e9dafd600ee0c35eefd720188
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import Vue from 'vue'
import App from './App.vue'
import './assets/tailwind.css'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import cookies from 'vue-cookies'
import apiConfig from './utils/baseurl'
import {
  Message
} from 'element-ui'
 
Vue.use(ElementUI)
Vue.prototype.$cookies = cookies;
Vue.prototype.$baseURL = apiConfig.baseURL
Vue.prototype.$mapKey = apiConfig.mapKey
Vue.prototype.$secretKey = apiConfig.secretKey
Vue.config.productionTip = false
/* 全局TableHeight */
Vue.prototype.$baseTableHeight = (formType) => {
  let height = window.innerHeight
  let paddingHeight = 200
  const formHeight = 50
 
  if ('number' == typeof formType) {
    height = height - paddingHeight - formHeight * formType
  } else {
    height = height - paddingHeight
  }
  return height
}
 
Vue.prototype.msgsuccess = function (msg) {
  Message({
    message: msg,
    type: "success"
  });
}
 
Vue.prototype.msgerror = function (msg) {
  Message({
    message: msg,
    type: "error"
  });
}
 
Vue.prototype.msgwarning = function (msg) {
  Message({
    message: msg,
    type: "warning"
  });
}
 
Vue.prototype.msginfo = function (msg) {
  Message({
    message: msg,
  });
}
 
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')