From 6103a8e5d2316af7fcf6b246e9e866e5216476f0 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期三, 18 三月 2026 11:11:34 +0800
Subject: [PATCH] #统一修改下拉框问题
---
rsf-admin/src/page/components/DictionaryArraySelect.jsx | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/rsf-admin/src/page/components/DictionaryArraySelect.jsx b/rsf-admin/src/page/components/DictionaryArraySelect.jsx
index f4f929c..f263326 100644
--- a/rsf-admin/src/page/components/DictionaryArraySelect.jsx
+++ b/rsf-admin/src/page/components/DictionaryArraySelect.jsx
@@ -4,7 +4,8 @@
Button, useListContext, SelectInput,
required, SelectArrayInput,
useTranslate, useNotify,
- SelectArrayInputClasses
+ SelectArrayInputClasses,
+ AutocompleteInput, AutocompleteArrayInput
} from 'react-admin';
import request from '@/utils/request';
@@ -12,7 +13,7 @@
const {
dictTypeCode,
name,
- multiple = false,
+ multiple = true,
perPage = 100, // 榛樿姣忛〉鏄剧ず100鏉℃暟鎹�
page = 1, // 榛樿绗竴椤�
...parmas
@@ -53,13 +54,21 @@
}
};
- const InputComponent = multiple ? SelectArrayInput : SelectInput;
+ const InputComponent = multiple ? AutocompleteArrayInput : AutocompleteInput;
return (
- <SelectArrayInput
+ <InputComponent
source={name}
choices={list}
isLoading={loading}
+ options={{
+ ListboxProps: {
+ style: {
+ maxHeight: '200px',
+ }
+ },
+ ...(parmas.options || {})
+ }}
{...parmas}
/>
);
--
Gitblit v1.9.1