84 lines
1.9 KiB
JavaScript
84 lines
1.9 KiB
JavaScript
import Vue from 'vue'
|
|
import App from './App.vue'
|
|
import router from './router'
|
|
import store from './store'
|
|
// 流程公共样式
|
|
import './assets/css/process.scss'
|
|
import './assets/css/common.scss'
|
|
import config from '@/utils/config'
|
|
// VXETable
|
|
import 'xe-utils'
|
|
import VXETable from 'vxe-table'
|
|
import 'vxe-table/lib/style.css'
|
|
// ElementUI
|
|
import ElementUI from 'element-ui'
|
|
|
|
import './assets/css/element-variables.scss'
|
|
// ECharts
|
|
import 'echarts'
|
|
import ECharts from './components/ECharts'
|
|
// Api
|
|
import Api from './api'
|
|
|
|
// 自定义指令
|
|
import Directive from './directives'
|
|
// 自定义过滤器
|
|
import Filter from './filters'
|
|
// 自定义水印指令
|
|
import '@/utils/waterMark'
|
|
// 加密函数
|
|
import JSEncrypt from '../src/assets/js/jsencrypt.min.js'
|
|
// 富文本引用
|
|
import VueQuillEditor from 'vue-quill-editor'
|
|
|
|
// require styles 引入样式
|
|
import 'quill/dist/quill.core.css'
|
|
import 'quill/dist/quill.snow.css'
|
|
import 'quill/dist/quill.bubble.css'
|
|
import dict from '@/components/dict'
|
|
|
|
VXETable.setup({
|
|
table: {
|
|
resizable: true
|
|
}
|
|
})
|
|
Vue.use(dict);
|
|
Vue.use(VXETable)
|
|
Vue.use(VueQuillEditor)
|
|
Vue.use(ElementUI, { size: 'mini', zIndex: 3000 })
|
|
Vue.component('v-chart', ECharts)
|
|
Vue.use(Api)
|
|
Vue.use(Directive)
|
|
Vue.use(Filter)
|
|
Vue.prototype.$JSEncrypt = (data) => {
|
|
if (data === '') {
|
|
return ''
|
|
}
|
|
const encryptor = new JSEncrypt()
|
|
encryptor.setPublicKey(config.PUBLIC_KEY)
|
|
return encryptor.encrypt(data) || ''
|
|
}
|
|
|
|
VXETable.renderer.add('NotData', {
|
|
// 空内容模板
|
|
renderEmpty (h, renderOpts) {
|
|
return [
|
|
<span>
|
|
<img width="100" src={require('./assets/imgs/icon-nodata.png')}/>
|
|
<p style="margin-top: 10px;">暂无数据</p>
|
|
</span>
|
|
]
|
|
}
|
|
})
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
new Vue({
|
|
router,
|
|
store,
|
|
beforeCreate(){
|
|
Vue.prototype.$bus = this //安装全局事件总线
|
|
},
|
|
render: h => h(App)
|
|
}).$mount('#app')
|