เปลี่ยน click เป็น change

This commit is contained in:
setthawutttty 2024-10-10 10:17:46 +07:00
parent e77f3f3b42
commit 974f226c9e

View file

@ -170,8 +170,10 @@ function fetchProfile() {
}
/** popup รายละเอียดของ ขออัปเดตข้อมูลจากกรมการปกครอง */
function onInfo() {
modalInfo.value = true;
function onInfo(val: string) {
if (val == "ขออัปเดตข้อมูลจากกรมการปกครอง") {
modalInfo.value = true;
}
}
watch(
@ -205,22 +207,11 @@ watch(
lazy-rules
hide-bottom-space
use-input
@update:model-value="onInfo(formData.topic)"
@filter="(inputValue:string,
doneFn:Function) => filterOption(inputValue, doneFn
) "
>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps">
<q-item-section v-if="scope.index == 0">
<q-item-label @click="onInfo">{{
scope.opt
}}</q-item-label>
</q-item-section>
<q-item-section v-else>
<q-item-label>{{ scope.opt }}</q-item-label>
</q-item-section>
</q-item>
</template>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
@ -323,7 +314,11 @@ watch(
<q-separator />
<q-card-actions align="right">
<q-btn label="ตกลง" color="secondary" type="submit"
<q-btn
label="ตกลง"
color="secondary"
type="submit"
@click="() => (modalInfo = false)"
><q-tooltip>ตกลง</q-tooltip></q-btn
>
</q-card-actions>