From 1e0da292a99accdb1e8c89925639ec5a6e7770e5 Mon Sep 17 00:00:00 2001 From: baiqi Date: Thu, 12 Dec 2024 17:34:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F):=20=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E4=B8=BB=E9=A2=98&=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=8A=A0=E8=BD=BD=E5=88=97=E8=A1=A8=E5=90=8E=E6=97=A0?= =?UTF-8?q?=E9=9C=80=E9=87=8D=E7=BD=AE=20filter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/App.vue | 5 ++++- frontend/src/components/pure/ms-table/useTable.ts | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 6cf075a536..18a95793a0 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -20,7 +20,7 @@ import { getQueryVariable, getUrlParameterWidthRegExp } from '@/utils'; import { setLoginExpires, setLongType, setToken } from '@/utils/auth'; import { getLocalStorage, setLocalStorage } from '@/utils/local-storage'; - import { setFavicon } from '@/utils/theme'; + import { setFavicon, watchStyle, watchTheme } from '@/utils/theme'; import { getLarkCallback, getLarkSuiteCallback, getPublicKeyRequest } from './api/modules/user'; import { hasAnyPermission } from './utils/permission'; @@ -42,6 +42,9 @@ } }); + // 初始化平台风格和主题色 + watchStyle(appStore.pageConfig.style, appStore.pageConfig); + watchTheme(appStore.pageConfig.theme, appStore.pageConfig); setFavicon(GetPlatformIconUrl); onBeforeMount(async () => { diff --git a/frontend/src/components/pure/ms-table/useTable.ts b/frontend/src/components/pure/ms-table/useTable.ts index b3b5a44733..71f5f8bb04 100644 --- a/frontend/src/components/pure/ms-table/useTable.ts +++ b/frontend/src/components/pure/ms-table/useTable.ts @@ -72,6 +72,7 @@ export default function useTableProps( showJumpMethod: false, // 是否显示跳转方法 isSimpleSetting: false, // 是否是简易column设置 filterIconAlignLeft: true, // 筛选图标是否靠左 + filter: {}, // 筛选条件 ...props, }; @@ -249,14 +250,12 @@ export default function useTableProps( propsRes.value.data = tmpArr.map((item: MsTableDataItem) => { return processRecordItem(item); }); - propsRes.value.filter = cloneDeep({ ...filterItem.value, ...loadListParams.value.filter }); if (data.total === 0) { setTableErrorStatus('empty'); } else { setTableErrorStatus(false); } setPagination({ current: data.current, total: data.total }); - return data; } } catch (err) { setTableErrorStatus('error');