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');