|
@@ -1,21 +1,142 @@
|
|
|
import type { App } from 'vue'
|
|
|
+
|
|
|
+import { System, Check, MenuFoldOne, MenuUnfoldOne, Logout, SettingTwo } from '@icon-park/vue-next'
|
|
|
+
|
|
|
+import ElementPlus from 'element-plus'
|
|
|
+import 'element-plus/dist/index.css'
|
|
|
+import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
|
|
+
|
|
|
+import 'xe-utils'
|
|
|
+import {
|
|
|
+ VxeIcon,
|
|
|
+ VxeLoading,
|
|
|
+
|
|
|
+ VxeTooltip,
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ VxeButton,
|
|
|
+
|
|
|
+ VxeModal
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+} from 'vxe-pc-ui'
|
|
|
+import {
|
|
|
+ VxeUI,
|
|
|
+ VXETable,
|
|
|
+ VxeTable,
|
|
|
+ VxeColumn,
|
|
|
+ VxeColgroup,
|
|
|
+
|
|
|
+ VxeToolbar
|
|
|
+} from 'vxe-table'
|
|
|
+import VxeUIPluginRenderElement from '@vxe-ui/plugin-render-element'
|
|
|
+import '@vxe-ui/plugin-render-element/dist/style.css'
|
|
|
+import 'vxe-table/styles/cssvar.scss'
|
|
|
+import 'vxe-pc-ui/styles/cssvar.scss'
|
|
|
+
|
|
|
+import zhCN from 'vxe-pc-ui/lib/language/zh-CN'
|
|
|
+import '@/utils/tableFormat'
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
const modules = import.meta.glob('./form/*.vue', { eager: true })
|
|
|
-import { System, Check, MenuFoldOne, MenuUnfoldOne, Logout, SettingTwo } from '@icon-park/vue-next'
|
|
|
|
|
|
-function registerComponent(app: App): void {
|
|
|
- for (const key in modules) {
|
|
|
- const name = key.replace(/^\.\/form\/|\.vue/g, '')
|
|
|
- const component = (modules[key] as any).default
|
|
|
- app.component('El' + name, component)
|
|
|
- }
|
|
|
+function LazyVxeUI(app: any) {
|
|
|
+ app.use(VxeIcon)
|
|
|
+ app.use(VxeLoading)
|
|
|
+
|
|
|
+ app.use(VxeTooltip)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ app.use(VxeButton)
|
|
|
+
|
|
|
+ app.use(VxeModal)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+function LazyVxeTable(app: any) {
|
|
|
+ app.use(VxeTable)
|
|
|
+ app.use(VxeColumn)
|
|
|
+ app.use(VxeColgroup)
|
|
|
+
|
|
|
+ app.use(VxeToolbar)
|
|
|
+}
|
|
|
|
|
|
+function registerComponent(app: App): void {
|
|
|
+
|
|
|
app.component('icon-system', System)
|
|
|
app.component('icon-check', Check)
|
|
|
app.component('icon-menu-fold-one', MenuFoldOne)
|
|
|
app.component('icon-menu-unfold-one', MenuUnfoldOne)
|
|
|
app.component('icon-logout', Logout)
|
|
|
app.component('icon-setting-two', SettingTwo)
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ app.use(ElementPlus)
|
|
|
+ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
|
|
+ app.component(key, component)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ VXETable.setI18n('zh-CN', zhCN)
|
|
|
+ VXETable.setLanguage('zh-CN')
|
|
|
+ VxeUI.use(VxeUIPluginRenderElement)
|
|
|
+ app.use(LazyVxeUI)
|
|
|
+ app.use(LazyVxeTable)
|
|
|
+
|
|
|
+
|
|
|
+ for (const key in modules) {
|
|
|
+ const name = key.replace(/^\.\/form\/|\.vue/g, '')
|
|
|
+ const component = (modules[key] as any).default
|
|
|
+ app.component('El' + name, component)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
export default registerComponent
|