refs #6280: remove related code to filter-rules
This commit is contained in:
parent
45dc9c355f
commit
9f9835b7ab
|
@ -12,15 +12,11 @@ const $props = defineProps({
|
|||
default: () => [],
|
||||
},
|
||||
optionLabel: {
|
||||
type: [String, Function],
|
||||
type: [String],
|
||||
default: '',
|
||||
},
|
||||
filterOptions: {
|
||||
type: [Array, Function],
|
||||
default: () => [],
|
||||
},
|
||||
filterRules: {
|
||||
type: [Array, Function],
|
||||
type: [Array],
|
||||
default: () => [],
|
||||
},
|
||||
isClearable: {
|
||||
|
@ -57,13 +53,6 @@ const filter = (val, options) => {
|
|||
const search = val.toString().toLowerCase();
|
||||
|
||||
if (!search) return options;
|
||||
if($props.filterRules.length) {
|
||||
const passSomeRule = $props.filterRules.some((rule) => {
|
||||
const cond = eval(rule)
|
||||
return cond;
|
||||
});
|
||||
if(!passSomeRule) return options
|
||||
}
|
||||
|
||||
return options.filter((row) => {
|
||||
if ($props.filterOptions.length) {
|
||||
|
|
Loading…
Reference in New Issue