Procházet zdrojové kódy

fix: 选择下拉加搜索

sun-chaochao před 3 roky
rodič
revize
a9be94524a
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9 0
      src/pages/Northbound/AliCloud/Detail/index.tsx

+ 9 - 0
src/pages/Northbound/AliCloud/Detail/index.tsx

@@ -204,6 +204,9 @@ const Detail = observer(() => {
         'x-component': 'Select',
         'x-component': 'Select',
         'x-component-props': {
         'x-component-props': {
           placeholder: '请选择网桥产品',
           placeholder: '请选择网桥产品',
+          showSearch: true,
+          filterOption: (input: string, option: any) =>
+            option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
         },
         },
         'x-decorator-props': {
         'x-decorator-props': {
           tooltip: '物联网平台对应的阿里云产品',
           tooltip: '物联网平台对应的阿里云产品',
@@ -239,6 +242,9 @@ const Detail = observer(() => {
                   'x-component': 'Select',
                   'x-component': 'Select',
                   'x-component-props': {
                   'x-component-props': {
                     placeholder: '请选择阿里云产品',
                     placeholder: '请选择阿里云产品',
+                    showSearch: true,
+                    filterOption: (input: string, option: any) =>
+                      option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
                   },
                   },
                   'x-decorator-props': {
                   'x-decorator-props': {
                     gridSpan: 12,
                     gridSpan: 12,
@@ -257,6 +263,9 @@ const Detail = observer(() => {
                   },
                   },
                   'x-component-props': {
                   'x-component-props': {
                     placeholder: '请选择平台产品',
                     placeholder: '请选择平台产品',
+                    showSearch: true,
+                    filterOption: (input: string, option: any) =>
+                      option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
                   },
                   },
                   'x-reactions': ['{{useAsyncDataSource(queryProductList)}}'],
                   'x-reactions': ['{{useAsyncDataSource(queryProductList)}}'],
                 },
                 },