Commit 2e6383b0f732a1a7ecb261698c459dd944dabb01

Authored by 陈洋
1 parent 7ae7fb89

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

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