105 lines
2.1 KiB
JavaScript
105 lines
2.1 KiB
JavaScript
/* eslint-disable */
|
|
import {
|
|
createApp
|
|
} from 'vue'
|
|
import App from './App.vue'
|
|
import i18n from './lang/i18n'
|
|
import store from './store'
|
|
import router from './router'
|
|
|
|
import '@/assets/styles/base.less'
|
|
|
|
import '@/assets/styles/quill.bubble.css'
|
|
import '@/assets/styles/quill.core.css'
|
|
import '@/assets/styles/quill.snow.css'
|
|
|
|
const app = createApp(App)
|
|
app.use(router)
|
|
app.use(store)
|
|
app.use(i18n)
|
|
|
|
// 全局注册store
|
|
app.config.globalProperties.$store = store
|
|
|
|
// 注册所有的工具类
|
|
import utils from './utils/index'
|
|
Object.keys(utils).map((k) => {
|
|
let c = utils[k]
|
|
app.config.globalProperties['$' + k] = c
|
|
app.provide('$' + k, c)
|
|
})
|
|
|
|
// 引入 arco design
|
|
import {
|
|
useArco
|
|
} from './plugins/arco'
|
|
app.use(useArco)
|
|
|
|
// 注册基础组件
|
|
import '@/comps/style/index'
|
|
import * as components from '@/comps/index'
|
|
Object.keys(components).map((k) => {
|
|
let c = components[k]
|
|
app.component(c.name, c)
|
|
})
|
|
|
|
// 注册所有的业务组件
|
|
import * as businessComponents from '@/components/index'
|
|
Object.keys(businessComponents).map((k) => {
|
|
let c = businessComponents[k]
|
|
app.component(c.name, c)
|
|
})
|
|
|
|
import VuePdfEmbed from 'vue-pdf-embed';
|
|
app.component('vue-pdf-embed', VuePdfEmbed);
|
|
|
|
// 注册vxe-table
|
|
import 'vxe-table/lib/style.css'
|
|
import {
|
|
Column,
|
|
Table,
|
|
Colgroup,
|
|
Tooltip,
|
|
Edit,
|
|
Validator
|
|
} from 'vxe-table'
|
|
app.use(Table).use(Colgroup).use(Column).use(Tooltip).use(Edit).use(Validator)
|
|
|
|
// 图片查看插件 v-viewer
|
|
import 'viewerjs/dist/viewer.css'
|
|
import VueViewer from 'v-viewer'
|
|
app.use(VueViewer, {
|
|
defaultOptions: {
|
|
zIndex: 9999
|
|
}
|
|
})
|
|
|
|
// import VuePlyr from 'vue-plyr'
|
|
// import 'vue-plyr/dist/vue-plyr.css'
|
|
// app.use(VuePlyr, {
|
|
// plyr: {
|
|
// iconUrl: '/plyr.svg'
|
|
// }
|
|
// })
|
|
|
|
// 日期时间处理
|
|
import dayjs from 'dayjs'
|
|
dayjs.locale('zh-cn')
|
|
app.config.globalProperties.$moment = dayjs
|
|
app.provide('$moment', dayjs)
|
|
|
|
// 复制到剪切板
|
|
import Clipboard from 'v-clipboard'
|
|
app.use(Clipboard)
|
|
// 注册uuid
|
|
import * as uuid from 'uuid'
|
|
app.config.globalProperties.$uuid = uuid
|
|
app.provide('$uuid', uuid)
|
|
|
|
// 文字溢出省略全局指令
|
|
import {
|
|
useClamp
|
|
} from './directive/clamp'
|
|
app.use(useClamp)
|
|
|
|
app.mount('#app') |