diff --git a/src/pages/system/Group.tsx b/src/pages/system/Group.tsx index 2b37869..c7546a9 100644 --- a/src/pages/system/Group.tsx +++ b/src/pages/system/Group.tsx @@ -257,6 +257,9 @@ const Group: React.FC = () => { setIsDrawerOpen(false) } + const filterOption = (input: string, option?: { label: string; value: string }) => + (option?.label ?? '').toLowerCase().includes(input.toLowerCase()) + const handleOnSubmit = () => { if (isSubmitting) { return @@ -586,6 +589,7 @@ const Group: React.FC = () => { mode={'multiple'} allowClear showSearch + filterOption={filterOption} options={roleData.map((value) => ({ value: value.id, label: `${value.name}${!value.enable ? '(已禁用)' : ''}` diff --git a/src/pages/system/Role.tsx b/src/pages/system/Role.tsx index f1451b8..81fd501 100644 --- a/src/pages/system/Role.tsx +++ b/src/pages/system/Role.tsx @@ -599,6 +599,7 @@ const Role: React.FC = () => { treeCheckable treeNodeLabelProp={'fullTitle'} allowClear + treeNodeFilterProp={'fullTitle'} loading={isLoadingPower} />