浏览代码

fix(user): select option search

Lind 3 年之前
父节点
当前提交
744435d2ba
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/pages/system/User/Save/index.tsx

+ 5 - 0
src/pages/system/User/Save/index.tsx

@@ -218,6 +218,9 @@ const Save = (props: Props) => {
         'x-component': 'Select',
         'x-component-props': {
           mode: 'multiple',
+          showArrow: true,
+          filterOption: (input: string, option: any) =>
+            option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
         },
         'x-reactions': ['{{useAsyncDataSource(getRole)}}'],
         'x-decorator-props': {
@@ -246,6 +249,8 @@ const Save = (props: Props) => {
         'x-component-props': {
           mode: 'multiple',
           showArrow: true,
+          filterOption: (input: string, option: any) =>
+            option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
         },
         'x-decorator-props': {
           addonAfter: (