Browse Source

fix(table): 修复高级查询过滤条件错误问题

pull/889/head
colin 2 years ago
parent
commit
19c7a52c48
  1. 5
      apps/vue/src/components/Table/src/components/AdvancedSearch.vue

5
apps/vue/src/components/Table/src/components/AdvancedSearch.vue

@ -105,6 +105,7 @@
import { BasicModal, useModalInner } from '/@/components/Modal';
import { useI18n } from '/@/hooks/web/useI18n';
import { DefineParamter, DynamicLogic, DynamicComparison, DynamicQueryable, DynamicParamter } from '../types/advancedSearch';
import { isNullOrWhiteSpace } from '/@/utils/strings';
import { isFunction } from '/@/utils/is';
import { get } from 'lodash-es';
@ -280,7 +281,9 @@
});
const filterOption = (input: string, option: any) => {
return option.description.toLowerCase().indexOf(input.toLowerCase()) >= 0;
if (isNullOrWhiteSpace(option.label) && isNullOrWhiteSpace(option.value)) return false;
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0 ;
};
onMounted(fetch);

Loading…
Cancel
Save