Showing
5 changed files
with
29 additions
and
12 deletions
| ... | ... | @@ -790,9 +790,11 @@ export const QxBaseConditionItem: React.FC<QxBaseConditionItemProps> = ({ |
| 790 | 790 | {showAssignment ? ( |
| 791 | 791 | <ControlOutlined |
| 792 | 792 | onClick={() => { |
| 793 | + if (optValTypeCheck.isEmptyType(value?.opt) || disabled) return; | |
| 793 | 794 | setOpen(!open); |
| 794 | 795 | }} |
| 795 | - className="qx-base-condition-item__content-suffix" | |
| 796 | + className={`qx-base-condition-item__content-suffix ${ | |
| 797 | + optValTypeCheck.isEmptyType(value?.opt) || disabled ? ' disabled' : ' '}`} | |
| 796 | 798 | /> |
| 797 | 799 | ) : null} |
| 798 | 800 | </> | ... | ... |
| 1 | 1 | @import '~@qx/ui/src/style/variable.less'; |
| 2 | 2 | |
| 3 | -.qx-base-condition-list { | |
| 4 | - | |
| 5 | - &-item { | |
| 6 | - display: flex; | |
| 7 | - align-items: center; | |
| 3 | +.qx-base-condition { | |
| 4 | + width: 100%; | |
| 8 | 5 | |
| 6 | + &-list { | |
| 7 | + width: 100%; | |
| 9 | 8 | |
| 10 | - &__idx { | |
| 11 | - color: @N9; | |
| 12 | - margin-right: 4px; | |
| 13 | - width: 24px; | |
| 14 | - display: inline-block; | |
| 9 | + &-item { | |
| 10 | + width: 100%; | |
| 11 | + display: flex; | |
| 12 | + align-items: center; | |
| 13 | + | |
| 14 | + | |
| 15 | + &__idx { | |
| 16 | + color: @N9; | |
| 17 | + margin-right: 4px; | |
| 18 | + width: 24px; | |
| 19 | + display: inline-block; | |
| 20 | + } | |
| 15 | 21 | } |
| 16 | 22 | } |
| 17 | 23 | } |
| 24 | + | ... | ... |
| ... | ... | @@ -51,7 +51,7 @@ export const QxBaseCondition: React.FC<QxBaseConditionProps> = (props) => { |
| 51 | 51 | |
| 52 | 52 | const handleItemChange = (val: any, key: number) => { |
| 53 | 53 | props.onChange?.( |
| 54 | - props.value?.map((item, idx) => { | |
| 54 | + (props.value || [])?.map((item, idx) => { | |
| 55 | 55 | if (idx === key) return val; |
| 56 | 56 | return props.value?.[idx] |
| 57 | 57 | ? props.value?.[idx] | ... | ... |