优化应用分组

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
request={queryAppList}
pagination={{}}
toolbar={
appGroupList?.length > 0
? {
menu: {
type: 'tab',
activeKey: currentGroup,
items: getItems(),
onChange(key) {
if (key) {
setCurrentGroup(key);
if (key === all) {
setSearchParams((values) => {
return { ...values, groupId: undefined };
});
} else {
setSearchParams((values) => {
return { ...values, groupId: key };
});
}
actionRef.current?.reload();
}
},
},
toolbar={{
menu: {
type: 'tab',
activeKey: currentGroup,
items: getItems(),
onChange(key) {
if (key) {
setCurrentGroup(key);
if (key === all) {
setSearchParams((values) => {
return { ...values, groupId: undefined };
});
} else {
setSearchParams((values) => {
return { ...values, groupId: key };
});
}
actionRef.current?.reload();
}
: {}
}
},
},
}}
params={searchParams}
actionRef={actionRef}
renderItem={(item: AppList) => {

View File

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