From e79c9477e7b67d196a303744b8cd63f59a3b6ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=9D=E5=85=88=E7=91=9E?= <1490493387@qq.com> Date: Sun, 1 May 2022 18:28:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Delement-plus=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E7=BB=84=E4=BB=B6=E5=A4=A7=E5=B0=8F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=97=A0=E6=95=88=E8=B0=83=E6=95=B4=E4=B8=BAconfig-provider?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: ddb0e86a2ab660fb442c7425d475d29bf58b8a6d --- src/App.vue | 5 +++-- src/components/SizeSelect/index.vue | 1 - src/main.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.vue b/src/App.vue index 68fd21e7..9c8c0a10 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,6 @@ @@ -17,6 +17,7 @@ import en from "element-plus/es/locale/lang/en"; const { app } = useStore(); const language = computed(() => app.language); +const size: any = computed(() => app.size); const locale = ref(); diff --git a/src/components/SizeSelect/index.vue b/src/components/SizeSelect/index.vue index dc8729fd..92b7031c 100644 --- a/src/components/SizeSelect/index.vue +++ b/src/components/SizeSelect/index.vue @@ -32,7 +32,6 @@ const sizeOptions = ref([ function handleSetSize(size: string) { app.setSize(size); - window.location.reload(); ElMessage.success("切换布局大小成功"); } diff --git a/src/main.ts b/src/main.ts index e5c254a1..7af01f38 100644 --- a/src/main.ts +++ b/src/main.ts @@ -38,6 +38,6 @@ app.config.globalProperties.$listDictsByCode = listDictsByCode app.component('Pagination', Pagination) .use(createPinia()) .use(router) - .use(ElementPlus, {size: localStorage.get('size') || 'default'}) + .use(ElementPlus) .use(i18n) .mount('#app')