From 845a7c455424ae3b5f5c2ae6b965bdad4401be52 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 10 四月 2025 12:38:28 +0800
Subject: [PATCH] no message
---
rsf-admin/src/page/components/DictionarySelect.jsx | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/rsf-admin/src/page/components/DictionarySelect.jsx b/rsf-admin/src/page/components/DictionarySelect.jsx
index 2523c5d..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,13 +31,15 @@
notify(res.data.msg);
}
}
+ const InputComponent = multiple ? SelectArrayInput : SelectInput;
return (
- <SelectInput
+ <InputComponent
source={name}
choices={list}
{...parmas}
/>
+
);
};
--
Gitblit v1.9.1