Explorar el Código

fix: 选择下拉加搜索

sun-chaochao hace 3 años
padre
commit
a9be94524a
Se han modificado 1 ficheros con 9 adiciones y 0 borrados
  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-props': {
           placeholder: '请选择网桥产品',
+          showSearch: true,
+          filterOption: (input: string, option: any) =>
+            option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
         },
         'x-decorator-props': {
           tooltip: '物联网平台对应的阿里云产品',
@@ -239,6 +242,9 @@ const Detail = observer(() => {
                   'x-component': 'Select',
                   'x-component-props': {
                     placeholder: '请选择阿里云产品',
+                    showSearch: true,
+                    filterOption: (input: string, option: any) =>
+                      option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
                   },
                   'x-decorator-props': {
                     gridSpan: 12,
@@ -257,6 +263,9 @@ const Detail = observer(() => {
                   },
                   'x-component-props': {
                     placeholder: '请选择平台产品',
+                    showSearch: true,
+                    filterOption: (input: string, option: any) =>
+                      option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0,
                   },
                   'x-reactions': ['{{useAsyncDataSource(queryProductList)}}'],
                 },