refactor: debounce on typing

This commit is contained in:
Methapon Metanipat 2024-10-10 15:05:00 +07:00
parent e3210abbd7
commit 99c43bdd66
2 changed files with 5 additions and 1 deletions

View file

@ -326,6 +326,7 @@ watch(
:type="readonly ? 'text' : 'number'" :type="readonly ? 'text' : 'number'"
style="width: 70px" style="width: 70px"
min="0" min="0"
debounce="500"
v-model="props.row.amount" v-model="props.row.amount"
/> />
</q-td> </q-td>
@ -347,6 +348,7 @@ watch(
input-class="text-right" input-class="text-right"
:type="readonly ? 'text' : 'number'" :type="readonly ? 'text' : 'number'"
style="width: 90px" style="width: 90px"
debounce="500"
v-model="props.row.discount" v-model="props.row.discount"
/> />
</q-td> </q-td>

View file

@ -497,7 +497,9 @@ watch(
outlined outlined
class="q-ml-auto price-tag" class="q-ml-auto price-tag"
input-class="text-right" input-class="text-right"
v-model="finalDiscount" debounce="500"
:model-value="finalDiscount"
@update:model-value="(v) => (finalDiscount = Number(v))"
/> />
<!-- <span class="q-ml-auto">{{ data?.totalVatIncluded || 0 }} ฿</span> --> <!-- <span class="q-ml-auto">{{ data?.totalVatIncluded || 0 }} ฿</span> -->
</div> </div>