This commit is contained in:
2022-12-30 16:13:19 +08:00
parent 379a852aee
commit c5d893ba35
43 changed files with 1468 additions and 1107 deletions

View File

@@ -16,6 +16,7 @@ const _sfc_main = defineComponent({
const props = __props;
const searchValue = inject("searchValue");
const selectRef = inject("selectRef");
const searchMethod = inject("searchMethod");
const selectedValue = inject("selectedValue");
const multiple = inject("multiple");
const checkboxRef = ref();
@@ -39,8 +40,13 @@ const _sfc_main = defineComponent({
return selectedValue.value === props.value;
}
});
const first = ref(true);
const display = computed(() => {
var _a, _b;
if (searchMethod && !first.value) {
return searchMethod(searchValue.value, props);
}
first.value = false;
return ((_a = props.keyword) == null ? void 0 : _a.toString().indexOf(searchValue.value)) > -1 || ((_b = props.label) == null ? void 0 : _b.toString().indexOf(searchValue.value)) > -1;
});
const classes = computed(() => {