优化应用分组

pull/59/head
awenes 2023-09-26 14:19:15 +08:00
parent f5534abb08
commit f6af7d2dae
2 changed files with 22 additions and 26 deletions

View File

@ -135,32 +135,28 @@ const CardList = () => {
manualRequest manualRequest
request={queryAppList} request={queryAppList}
pagination={{}} pagination={{}}
toolbar={ toolbar={{
appGroupList?.length > 0 menu: {
? { type: 'tab',
menu: { activeKey: currentGroup,
type: 'tab', items: getItems(),
activeKey: currentGroup, onChange(key) {
items: getItems(), if (key) {
onChange(key) { setCurrentGroup(key);
if (key) { if (key === all) {
setCurrentGroup(key); setSearchParams((values) => {
if (key === all) { return { ...values, groupId: undefined };
setSearchParams((values) => { });
return { ...values, groupId: undefined }; } else {
}); setSearchParams((values) => {
} else { return { ...values, groupId: key };
setSearchParams((values) => { });
return { ...values, groupId: key }; }
}); actionRef.current?.reload();
}
actionRef.current?.reload();
}
},
},
} }
: {} },
} },
}}
params={searchParams} params={searchParams}
actionRef={actionRef} actionRef={actionRef}
renderItem={(item: AppList) => { renderItem={(item: AppList) => {

View File

@ -17,7 +17,7 @@
*/ */
export default { export default {
'pages.application.search.name': '应用名称', 'pages.application.search.name': '应用名称',
'pages.application.group_all': '全部', 'pages.application.group_all': '全部应用',
'pages.application.tab.list': '应用列表', 'pages.application.tab.list': '应用列表',
'pages.application.tab.account': '应用账号', 'pages.application.tab.account': '应用账号',
'pages.application.init.warning': '仅允许应用发起', 'pages.application.init.warning': '仅允许应用发起',