refactor: pinia整合优化重构

This commit is contained in:
郝先瑞
2022-03-11 00:07:34 +08:00
parent 7bd9d70433
commit 4ae629ab65
26 changed files with 675 additions and 563 deletions

View File

@@ -7,17 +7,19 @@
<script setup lang="ts">
import {computed, onMounted, ref, watch} from "vue";
import {useAppStoreHook} from "@/store/modules/app";
import {ElConfigProvider} from 'element-plus'
import {localStorage} from "@/utils/storage";
import useStore from "@/store";
//官方文档: https://element-plus.gitee.io/zh-CN/guide/i18n.html
// 导入 Element Plus 语言包
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import en from 'element-plus/es/locale/lang/en'
const language = computed(() => useAppStoreHook().language)
const {app} =useStore()
const language = computed(() => app.language)
const locale = ref()
watch(language, (value) => {