Add all dashboard projects
This commit is contained in:
50
装配任务看板/src/main.js
Normal file
50
装配任务看板/src/main.js
Normal file
@@ -0,0 +1,50 @@
|
||||
import {createApp} from 'vue'
|
||||
import App from './App.vue'
|
||||
//ElementPlus
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
// TDesign
|
||||
import TDesign from 'tdesign-vue-next'
|
||||
// 引入组件库的少量全局样式变量
|
||||
import 'tdesign-vue-next/es/style/index.css'
|
||||
// datav
|
||||
import DataVVue3 from 'datav-vue3'
|
||||
// pinia
|
||||
import {createPinia} from 'pinia'
|
||||
//router
|
||||
import router from './router/index.js'
|
||||
//crud
|
||||
import curdVue3 from './utils/curdVue3'
|
||||
// el-icon
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||
|
||||
const app = createApp(App)
|
||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component)
|
||||
}
|
||||
// 提供全局方法
|
||||
|
||||
|
||||
app.use(ElementPlus, {
|
||||
locale: zhCn,
|
||||
})
|
||||
|
||||
app.use(TDesign)
|
||||
app.use(DataVVue3)
|
||||
const pinia = createPinia() // 创建 Pinia 实例
|
||||
app.use(pinia)
|
||||
app.use(curdVue3)
|
||||
app.use(router)
|
||||
|
||||
app.provide('CreateData', app.config.globalProperties.CreateData)
|
||||
app.provide('ExecDatabase', app.config.globalProperties.ExecDatabase)
|
||||
app.provide('ExecDatabaseByParam', app.config.globalProperties.ExecDatabaseByParam)
|
||||
// app.provide('ExecWritePLC', app.config.globalProperties.ExecWritePLC)
|
||||
// app.provide('ExecReadPLC', app.config.globalProperties.ExecReadPLC)
|
||||
// app.provide('ExecIMESAPI', app.config.globalProperties.ExecIMESAPI)
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
// useRouteGuard(); // 使用路由守卫
|
||||
|
||||
Reference in New Issue
Block a user