import Vue from 'vue'
|
import App from './App.vue'
|
|
import './assets/common.less'
|
import './assets/tailwind.css'
|
import dataV from '@jiaminghi/data-view'
|
import router from './router'
|
import store from './store'
|
import moment from 'moment'
|
import animated from 'animate.css'
|
import 'vue2-animate/dist/vue2-animate.min.css';
|
import axios from './utils/request';
|
import 'echarts-gl';
|
import * as echarts from 'echarts';
|
import TitleBox from './components/titleBox.vue'
|
import CustomTable from './components/customTable.vue'
|
import CustomPagination from './components/customPagination.vue'
|
import CustomDialog from './components/customDialog.vue'
|
import CustomPreview from './components/customPreview.vue'
|
|
|
|
Vue.component('TitleBox', TitleBox)
|
Vue.component('CustomTable', CustomTable)
|
Vue.component('CustomPagination', CustomPagination)
|
Vue.component('CustomDialog', CustomDialog)
|
Vue.component('CustomPreview', CustomPreview)
|
|
Vue.prototype.$axios = axios
|
Vue.prototype.$echarts = echarts
|
Vue.prototype.$store = store
|
|
|
Vue.filter('formatNumber', (num) => {
|
if (num && num >= 1000) {
|
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
} else {
|
return num || 0
|
}
|
})
|
|
// 这是年月日时分秒的格式 dateTime这个是自己定义的
|
Vue.filter('dateTime', function (dataStr, pattern = 'YYYY.MM.DD HH:mm:ss') {
|
return moment(dataStr).format(pattern)
|
})
|
|
import ElementUI from 'element-ui';
|
|
Vue.use(ElementUI)
|
Vue.use(animated)
|
|
Vue.config.productionTip = false
|
|
Vue.use(dataV)
|
|
|
import './assets/font/font.css'
|
new Vue({
|
router,
|
store,
|
render: h => h(App)
|
}).$mount('#app')
|