From 065322f908cbbd4c0816c50939fa732e17138df1 Mon Sep 17 00:00:00 2001 From: jlzhou <12020042@qq.com> Date: Sat, 6 May 2023 10:12:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9store?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.js | 4 ++-- src/store/index.js | 4 +++- src/utils/dynamicTitle.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.js b/src/main.js index fcdb585..065fa4d 100644 --- a/src/main.js +++ b/src/main.js @@ -7,7 +7,7 @@ import locale from 'element-plus/lib/locale/lang/zh-cn' // 中文语言 import '@/assets/styles/index.scss' // global css import App from './App' -import store from './store' +import { store } from './store' import router from './router' import directive from './directive' // directive @@ -83,6 +83,6 @@ app.use(ElementPlus, { }) // 修改 el-dialog 默认点击遮照为不关闭 -app._context.components.ElDialog.props.closeOnClickModal.default = false +// app._context.components.ElDialog.props.closeOnClickModal.default = false app.mount('#app') diff --git a/src/store/index.js b/src/store/index.js index f10f389..84d8fd1 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,3 +1,5 @@ const store = createPinia() -export default store \ No newline at end of file +export { store } +export * as useAppStore from './modules/app'; +export * as useDictStore from './modules/dict'; \ No newline at end of file diff --git a/src/utils/dynamicTitle.js b/src/utils/dynamicTitle.js index 64404b2..3094657 100644 --- a/src/utils/dynamicTitle.js +++ b/src/utils/dynamicTitle.js @@ -1,4 +1,4 @@ -import store from '@/store' +import {store} from '@/store' import defaultSettings from '@/settings' import useSettingsStore from '@/store/modules/settings'