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