From fe75cffbf3bae6777aa2794fd89fa5dc37f5df8d Mon Sep 17 00:00:00 2001 From: gaoluyang <2820782392@qq.com> Date: 星期二, 15 七月 2025 10:11:23 +0800 Subject: [PATCH] 项目初始化 --- src/main.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..021ac8f --- /dev/null +++ b/src/main.js @@ -0,0 +1,38 @@ +import App from './App.vue' +import plugins from './plugins' +import store from './store' +import uviewPlus from 'uview-plus' + + +import { createSSRApp } from 'vue' +import directive from './directive' // directive + +import { useDict } from '@/utils/dict' +import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi' + + + +export function createApp() { + const app = createSSRApp(App) + app.use(store) + app.use(uviewPlus) + app.use(plugins) + + // #ifndef MP-WEIXIN + // 寰俊灏忕▼搴忎腑涓嶆敮鎸佽嚜瀹氫箟鎸囦护 + directive(app) + // #endif + + // 鍏ㄥ眬鏂规硶鎸傝浇 + app.config.globalProperties.useDict = useDict + app.config.globalProperties.parseTime = parseTime + app.config.globalProperties.resetForm = resetForm + app.config.globalProperties.handleTree = handleTree + app.config.globalProperties.addDateRange = addDateRange + app.config.globalProperties.selectDictLabel = selectDictLabel + app.config.globalProperties.selectDictLabels = selectDictLabels + + return { + app + } +} -- Gitblit v1.9.3