From 8ae48b5c7cedad6834e7363787906190fcd7c67f Mon Sep 17 00:00:00 2001 From: "P)" <7828027+foxp8y@user.noreply.gitee.com> Date: Thu, 23 Dec 2021 05:11:31 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=20=E4=BF=AE=E6=94=B9eleme?= =?UTF-8?q?ntPlus=20=E7=BB=84=E4=BB=B6size=E6=97=A0=E6=95=88BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/other.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/utils/other.ts b/src/utils/other.ts index ab7f27e..10d5bf1 100644 --- a/src/utils/other.ts +++ b/src/utils/other.ts @@ -63,9 +63,8 @@ export const lazyImg = (el: any, arr: any) => { * 全局组件大小 * @returns 返回 `window.localStorage` 中读取的缓存值 `globalComponentSize` */ -export function globalComponentSize() { - return Local.get('themeConfig')?.globalComponentSize; -} +export const globalComponentSize: string = Local.get('themeConfig')?.globalComponentSize || store.state.themeConfig.themeConfig?.globalComponentSize; + /** * 对象深克隆 @@ -123,9 +122,7 @@ const other = { lazyImg: (el: any, arr: any) => { lazyImg(el, arr); }, - globalComponentSize: () => { - globalComponentSize(); - }, + globalComponentSize, deepClone: (obj: any) => { deepClone(obj); },