Commit 2e6383b0f732a1a7ecb261698c459dd944dabb01

Authored by 陈洋
1 parent 7ae7fb89

pref: 根据antd5 Dropdown API 做迭代处理

@@ -2,5 +2,6 @@ export * from './qx-filter-condition'; @@ -2,5 +2,6 @@ export * from './qx-filter-condition';
2 export * from './qx-parameter-setting'; 2 export * from './qx-parameter-setting';
3 export * from './qx-sort-condition'; 3 export * from './qx-sort-condition';
4 export * from './qx-base-icon'; 4 export * from './qx-base-icon';
  5 +export * from './qx-tags-input';
5 // export * from './qx-btn'; 6 // export * from './qx-btn';
6 // export { default as FieldSetter } from './qx-field-setter'; 7 // export { default as FieldSetter } from './qx-field-setter';
@@ -795,7 +795,7 @@ export const QxFilterCondition: React.FC<paramFilterConditionProps> = ({ @@ -795,7 +795,7 @@ export const QxFilterCondition: React.FC<paramFilterConditionProps> = ({
795 {getOperationOptions(item?.field) && 795 {getOperationOptions(item?.field) &&
796 getOperationOptions(item?.field).length > 0 && ( 796 getOperationOptions(item?.field).length > 0 && (
797 <Dropdown 797 <Dropdown
798 - overlay={ 798 + dropdownRender={() => (
799 <Menu> 799 <Menu>
800 {getOperationOptions(item?.field).map((oVal: any, oKey: number) => ( 800 {getOperationOptions(item?.field).map((oVal: any, oKey: number) => (
801 <Menu.Item 801 <Menu.Item
@@ -834,7 +834,7 @@ export const QxFilterCondition: React.FC<paramFilterConditionProps> = ({ @@ -834,7 +834,7 @@ export const QxFilterCondition: React.FC<paramFilterConditionProps> = ({
834 </Menu.Item> 834 </Menu.Item>
835 ))} 835 ))}
836 </Menu> 836 </Menu>
837 - } 837 + )}
838 > 838 >
839 <Button 839 <Button
840 className={'qx-query-text-opt'} 840 className={'qx-query-text-opt'}
@@ -925,7 +925,7 @@ export const QxFilterCondition: React.FC<paramFilterConditionProps> = ({ @@ -925,7 +925,7 @@ export const QxFilterCondition: React.FC<paramFilterConditionProps> = ({
925 <span>条件组合方式</span> 925 <span>条件组合方式</span>
926 <div style={{ cursor: 'pointer', textAlign: 'right' }}> 926 <div style={{ cursor: 'pointer', textAlign: 'right' }}>
927 <Dropdown 927 <Dropdown
928 - overlay={ 928 + dropdownRender={() => (
929 <Menu> 929 <Menu>
930 {OperatorCol.map((oc: any) => ( 930 {OperatorCol.map((oc: any) => (
931 <Menu.Item key={oc.key} onClick={(e) => setSqlType(cloneDeep(e.key))}> 931 <Menu.Item key={oc.key} onClick={(e) => setSqlType(cloneDeep(e.key))}>
@@ -933,7 +933,7 @@ export const QxFilterCondition: React.FC<paramFilterConditionProps> = ({ @@ -933,7 +933,7 @@ export const QxFilterCondition: React.FC<paramFilterConditionProps> = ({
933 </Menu.Item> 933 </Menu.Item>
934 ))} 934 ))}
935 </Menu> 935 </Menu>
936 - } 936 + )}
937 > 937 >
938 <span> 938 <span>
939 {sqlTypeTextConvert(getOperCol(sqlType)?.text)} <DownOutlined /> 939 {sqlTypeTextConvert(getOperCol(sqlType)?.text)} <DownOutlined />
@@ -664,11 +664,13 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => { @@ -664,11 +664,13 @@ export const QxParameterSetting: React.FC<ParameterSettingProps> = (props) => {
664 <Dropdown 664 <Dropdown
665 trigger={['click']} 665 trigger={['click']}
666 className={'hidden-select'} 666 className={'hidden-select'}
667 - menu={{  
668 - items: valueOptions,  
669 - className: 'dropdown',  
670 - onClick: onSelect  
671 - }} 667 + dropdownRender={() => (
  668 + <Menu
  669 + items={valueOptions}
  670 + className={'dropdown'}
  671 + onClick={onSelect}
  672 + />
  673 + )}
672 > 674 >
673 <Button type={'link'}> 675 <Button type={'link'}>
674 <PlusOutlined /> 676 <PlusOutlined />