| | |
| | | import { createApp } from 'vue'; |
| | | // global css |
| | | import 'uno.css'; |
| | | import 'virtual:uno.css'; |
| | | import '@/assets/styles/index.scss'; |
| | | import 'element-plus/theme-chalk/dark/css-vars.css'; |
| | | |
| | |
| | | |
| | | // 注册插件 |
| | | import plugins from './plugins/index'; // plugins |
| | | import { download } from '@/utils/request'; |
| | | |
| | | // 预设动画 |
| | | import animate from './animate'; |
| | | // 高亮组件 |
| | | // import 'highlight.js/styles/a11y-light.css'; |
| | | import 'highlight.js/styles/atom-one-dark.css'; |
| | | import 'highlight.js/lib/common'; |
| | | import HighLight from '@highlightjs/vue-plugin'; |
| | | |
| | | // svg图标 |
| | | import 'virtual:svg-icons-register'; |
| | |
| | | // permission control |
| | | import './permission'; |
| | | |
| | | import { useDict } from '@/utils/dict'; |
| | | import { getConfigKey, updateConfigByKey } from '@/api/system/config'; |
| | | import { parseTime, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'; |
| | | // 国际化 |
| | | import i18n from '@/lang/index'; |
| | | |
| | | // vxeTable |
| | | import VXETable from 'vxe-table'; |
| | | import 'vxe-table/lib/style.css'; |
| | | VXETable.config({ |
| | | zIndex: 999999 |
| | | }); |
| | | |
| | | // 修改 el-dialog 默认点击遮照为不关闭 |
| | | import { ElDialog } from 'element-plus'; |
| | | ElDialog.props.closeOnClickModal.default = false; |
| | | |
| | | const app = createApp(App); |
| | | // 全局方法挂载 |
| | | app.config.globalProperties.useDict = useDict; |
| | | app.config.globalProperties.getConfigKey = getConfigKey; |
| | | app.config.globalProperties.updateConfigByKey = updateConfigByKey; |
| | | app.config.globalProperties.download = download; |
| | | app.config.globalProperties.parseTime = parseTime; |
| | | app.config.globalProperties.handleTree = handleTree; |
| | | app.config.globalProperties.addDateRange = addDateRange; |
| | | app.config.globalProperties.selectDictLabel = selectDictLabel; |
| | | app.config.globalProperties.selectDictLabels = selectDictLabels; |
| | | app.config.globalProperties.animate = animate; |
| | | |
| | | app.use(HighLight); |
| | | app.use(ElementIcons); |
| | | app.use(router); |
| | | app.use(store); |
| | | app.use(i18n); |
| | | app.use(VXETable); |
| | | app.use(plugins); |
| | | // 自定义指令 |
| | | directive(app); |