ปรับวินัย

This commit is contained in:
setthawutttty 2023-12-27 15:50:41 +07:00
parent 117cc8aeb8
commit 5c1b67a642
12 changed files with 161 additions and 190 deletions

View file

@ -236,6 +236,12 @@ function yearAll() {
formData.year = 0;
getData();
}
function resetFilter(){
filterKeyword.value = "";
getData()
};
/** เรียกใช้งาน ฟังชั่น ตอนเริ่มโหลดหน้า */
onMounted(async () => {
getData();
@ -341,18 +347,25 @@ onMounted(async () => {
<q-space />
<q-input
for="#search"
class="col-xs-12 col-sm-3 col-md-2"
id="filterTable"
for="filterTable"
standout
dense
outlined
v-model="filterKeyword"
label="ค้นหา"
ref="filterRef"
outlined
debounce="300"
placeholder="ค้นหา"
@keydown.enter.prevent="filterFn"
>
<template v-slot:append>
<q-icon name="search" />
<q-icon v-if="filterKeyword == ''" name="search" />
<q-icon
v-if="filterKeyword !== ''"
name="clear"
class="cursor-pointer"
@click="resetFilter"
/>
</template>
</q-input>