Skip to content

Commit

Permalink
fix: clause-from supported operators fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aceHubert committed Mar 26, 2024
1 parent 2a19d53 commit 0ba12cd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ export default defineComponent({
ships.push(ship);
}
}
// 如果可先值为数级,操作只允许等于和不等于
if (Array.isArray(field._allowedValues)) {
// 如果可选项时,操作只允许等于和不等于
if (Array.isArray(field._allowedValues) && field._allowedValues.length) {
return ships.filter(({ value: operator }) => [ClauseOperator.Equal, ClauseOperator.Unequal].includes(operator));
} else {
return ships;
Expand Down

0 comments on commit 0ba12cd

Please sign in to comment.