refactor: filter bank
This commit is contained in:
parent
269acec48e
commit
971fd835c2
1 changed files with 3 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ import { BankBook } from 'stores/branch/types';
|
||||||
const optionStore = useOptionStore();
|
const optionStore = useOptionStore();
|
||||||
|
|
||||||
const bankBookOptions = ref<Record<string, unknown>[]>([]);
|
const bankBookOptions = ref<Record<string, unknown>[]>([]);
|
||||||
let bankBoookFilter: (
|
let bankBookFilter: (
|
||||||
value: string,
|
value: string,
|
||||||
update: (callbackFn: () => void, afterFn?: (ref: QSelect) => void) => void,
|
update: (callbackFn: () => void, afterFn?: (ref: QSelect) => void) => void,
|
||||||
) => void;
|
) => void;
|
||||||
|
|
@ -26,7 +26,7 @@ defineProps<{
|
||||||
watch(
|
watch(
|
||||||
() => optionStore.globalOption,
|
() => optionStore.globalOption,
|
||||||
() => {
|
() => {
|
||||||
bankBoookFilter = selectFilterOptionRefMod(
|
bankBookFilter = selectFilterOptionRefMod(
|
||||||
ref(optionStore.globalOption.bankBook),
|
ref(optionStore.globalOption.bankBook),
|
||||||
bankBookOptions,
|
bankBookOptions,
|
||||||
'label',
|
'label',
|
||||||
|
|
@ -70,7 +70,7 @@ watch(
|
||||||
@update:model-value="
|
@update:model-value="
|
||||||
(v) => (typeof v === 'string' ? (bankBook.bankName = v) : '')
|
(v) => (typeof v === 'string' ? (bankBook.bankName = v) : '')
|
||||||
"
|
"
|
||||||
@filter="bankBoookFilter"
|
@filter="bankBookFilter"
|
||||||
@clear="bankBook.bankName = ''"
|
@clear="bankBook.bankName = ''"
|
||||||
>
|
>
|
||||||
<template v-slot:option="scope">
|
<template v-slot:option="scope">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue