// The Vue build version to load with the `import` command
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
import Vue from 'vue'
|
import store from "./store/index.js" //引入你新建的store文件
|
import elementUI from 'element-ui'
|
import 'element-ui/lib/theme-chalk/index.css'
|
|
import './assets/main.css'
|
|
import App from './App'
|
import router from './router'
|
|
import contentmenu from 'v-contextmenu'
|
import 'v-contextmenu/dist/index.css'
|
import VueParticles from 'vue-particles'
|
import dataV from '@jiaminghi/data-view'
|
|
// 引入echarts
|
import * as echarts from 'echarts';
|
Vue.prototype.$echarts = echarts
|
|
Vue.use(VueParticles)
|
Vue.use(dataV)
|
Vue.use(contentmenu)
|
Vue.config.productionTip = false
|
Vue.use(elementUI);
|
window.sessionStorage.clear();
|
Vue.prototype.validForbid = function (value, number = 255) {
|
value = value.replace(/[`~!@#$%^&*()_\-+=<>?:"{}|,./;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/g, '').replace(/\s/g, "");
|
if (value.length >= number) {
|
this.$message({
|
type: "warning",
|
message: `输入内容不能超过${number}个字符`
|
});
|
}
|
return value;
|
}
|
/* eslint-disable no-new */
|
new Vue({
|
el: '#app',
|
router,
|
store,//注册你新建的store文件
|
components: { App },
|
template: '<App/>'
|
})
|