123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- // with polyfills
- import 'core-js/stable'
- import 'regenerator-runtime/runtime'
- import Vue from 'vue'
- import App from './App.vue'
- import router from './router'
- import permission from './directive/permission'
- import store from './store/'
- import i18n from './locales'
- import { VueAxios } from './utils/request'
- // import '@/views/system/securityCheck/styles/index.scss' // global css
- import ProLayout, { PageHeaderWrapper } from '@/components/ProLayout'
- import FooterToolBar from '@/components/FooterToolbar'
- import themePluginConfig from '../config/themePluginConfig'
- import * as echarts from 'echarts'
- // mock
- // WARNING: `mockjs` NOT SUPPORT `IE` PLEASE DO NOT USE IN `production` ENV.
- // import './mock'
- import '@/assets/styles/antv-theme.less'
- import bootstrap from './core/bootstrap'
- import './core/lazy_use' // use lazy load components
- import './permission' // permission control
- import './utils/filter' // global filter
- import draggable from '@/utils/drag'
- import './global.less' // global style
- import { getDicts, getAllDicts } from '@/api/system/dict/data'
- import { getConfigKey } from '@/api/system/config'
- import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, downloadTask, downloadByPath, handleTree, appendTreeNode, removeTreeNode, expandTree } from '@/utils/aidex'
- import Highlight from './utils/highlight'
- // 全局方法挂载
- Vue.prototype.getDicts = getDicts
- Vue.prototype.getAllDicts = getAllDicts
- Vue.prototype.getConfigKey = getConfigKey
- Vue.prototype.parseTime = parseTime
- Vue.prototype.resetForm = resetForm
- Vue.prototype.addDateRange = addDateRange
- Vue.prototype.selectDictLabel = selectDictLabel
- Vue.prototype.selectDictLabels = selectDictLabels
- Vue.prototype.download = download
- Vue.prototype.downloadTask = downloadTask
- Vue.prototype.downloadByPath = downloadByPath
- Vue.prototype.handleTree = handleTree
- Vue.prototype.appendTreeNode = appendTreeNode
- Vue.prototype.removeTreeNode = removeTreeNode
- Vue.prototype.expandTree = expandTree
- Vue.config.productionTip = false
- Vue.prototype.$echarts = echarts
- // mount axios to `Vue.$http` and `this.$http`
- Vue.use(VueAxios)
- // use pro-layout components
- Vue.component('pro-layout', ProLayout)
- Vue.component('page-container', PageHeaderWrapper)
- Vue.component('page-header-wrapper', PageHeaderWrapper)
- Vue.component('footer-tool-bar', FooterToolBar)
- Vue.use(permission)
- Vue.use(Highlight)
- Vue.use(draggable)
- import {
- Base,
- Affix,
- Anchor,
- AutoComplete,
- Alert,
- Avatar,
- BackTop,
- Badge,
- Breadcrumb,
- Button,
- Calendar,
- Card,
- Collapse,
- Carousel,
- Cascader,
- Checkbox,
- Col,
- DatePicker,
- Divider,
- Dropdown,
- Form,
- FormModel,
- Icon,
- Input,
- InputNumber,
- Layout,
- List,
- LocaleProvider,
- Menu,
- Mentions,
- Modal,
- Pagination,
- Popconfirm,
- Popover,
- Progress,
- Radio,
- Rate,
- Row,
- Select,
- Slider,
- Spin,
- Statistic,
- Steps,
- Switch,
- Table,
- Transfer,
- Tree,
- TreeSelect,
- Tabs,
- Tag,
- TimePicker,
- Timeline,
- Tooltip,
- Upload,
- Drawer,
- Skeleton,
- Comment,
- // ColorPicker,
- ConfigProvider,
- Empty,
- Result,
- Descriptions,
- PageHeader,
- Space,
- } from 'ant-design-vue';
- // Vue.use(DatePicker);
- const components = [
- Base,
- Affix,
- Anchor,
- AutoComplete,
- Alert,
- Avatar,
- BackTop,
- Badge,
- Breadcrumb,
- Button,
- Calendar,
- Card,
- Collapse,
- Carousel,
- Cascader,
- Checkbox,
- Col,
- DatePicker,
- Divider,
- Dropdown,
- Form,
- FormModel,
- Icon,
- Input,
- InputNumber,
- Layout,
- List,
- LocaleProvider,
- Menu,
- Mentions,
- Modal,
- Pagination,
- Popconfirm,
- Popover,
- Progress,
- Radio,
- Rate,
- Row,
- Select,
- Slider,
- Spin,
- Statistic,
- Steps,
- Switch,
- Table,
- Transfer,
- Tree,
- TreeSelect,
- Tabs,
- Tag,
- TimePicker,
- Timeline,
- Tooltip,
- Upload,
- Drawer,
- Skeleton,
- Comment,
- ConfigProvider,
- Empty,
- Result,
- Descriptions,
- PageHeader,
- Space,
- ];
- Vue.use(VueAxios)
- components.map(component => {
- Vue.use(component);
- });
- window.umi_plugin_ant_themeVar = themePluginConfig.theme
- new Vue({
- router,
- store,
- i18n,
- // init localstorage, vuex
- created: bootstrap,
- render: h => h(App)
- }).$mount('#app')
|