From b5e8045d5f5b5401b696db12f62fdbcc86dc5c5d Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期四, 10 四月 2025 11:40:02 +0800 Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/wms-master into devlop --- rsf-admin/src/page/components/DictionarySelect.jsx | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rsf-admin/src/page/components/DictionarySelect.jsx b/rsf-admin/src/page/components/DictionarySelect.jsx index 2a0a428..0eb2fab 100644 --- a/rsf-admin/src/page/components/DictionarySelect.jsx +++ b/rsf-admin/src/page/components/DictionarySelect.jsx @@ -2,13 +2,13 @@ import { useState, useEffect } from 'react'; import { Button, useListContext, SelectInput, - required, + required, SelectArrayInput, useTranslate, useNotify } from 'react-admin'; import request from '@/utils/request'; const DictionarySelect = (props) => { - const { dictTypeCode, name, ...parmas } = props; + const { dictTypeCode, name, multiple = false, ...parmas } = props; const translate = useTranslate(); const notify = useNotify(); const [list, setList] = useState([]) @@ -31,14 +31,15 @@ notify(res.data.msg); } } + const InputComponent = multiple ? SelectArrayInput : SelectInput; return ( - <SelectInput + <InputComponent source={name} choices={list} - {...parmas} /> + ); }; -- Gitblit v1.9.1