Commit 6f9dec9cf3d75734763466026d78d3dc1c8e3655

Authored by 李婷
1 parent b742bbeb

feat: 添加placeholder

Showing 1 changed file with 4 additions and 2 deletions
... ... @@ -24,6 +24,8 @@ export const QxFormSelect: React.FC<FormSelectProps> = (props) => {
24 24 appId,
25 25 request,
26 26 disabled,
  27 + placeholder,
  28 + title
27 29 } = props;
28 30
29 31 const [state, setState] = useSetState<FormSelectState>({
... ... @@ -59,7 +61,7 @@ export const QxFormSelect: React.FC<FormSelectProps> = (props) => {
59 61 ref={inputSelectRef}
60 62 value={value?.name}
61 63 defaultValue={value?.name}
62   - placeholder="请选择数据源"
  64 + placeholder={placeholder || '请选择数据源'}
63 65 prefix={<BlockOutlined style={{ color: '#52c41a' }} />}
64 66 options={options}
65 67 onChange={handleChange}
... ... @@ -82,7 +84,7 @@ export const QxFormSelect: React.FC<FormSelectProps> = (props) => {
82 84
83 85 {state.modalVisible ? (
84 86 <QxAppSelector
85   - title="选择数据源"
  87 + title={title || placeholder || "选择数据源"}
86 88 item={{
87 89 flag: 'SINGLE',
88 90 currentId: '',
... ...