From 4dbf1de05da756c610c03f5b2384574d8e2d1178 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Thu, 18 Jan 2024 16:23:27 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormTime.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/FormTime.vue b/src/components/FormTime.vue index 5c4b181..57337e5 100644 --- a/src/components/FormTime.vue +++ b/src/components/FormTime.vue @@ -14,7 +14,7 @@ import { useCounterMixin } from '@/stores/mixin' const $q = useQuasar() const mixin = useCounterMixin() -const { date2Thai, success, dialogConfirm } = mixin +const { date2Thai, success, dialogConfirm, showLoader, hideLoader } = mixin const props = defineProps({ dataById: { @@ -97,6 +97,7 @@ function onCkickSave() { * @param data body Request */ async function createListTime(data: FormTimeStemp) { + showLoader() await http .post(config.API.createTimeStamp(), data) .then(() => { @@ -107,6 +108,7 @@ async function createListTime(data: FormTimeStemp) { }) .finally(() => { props.closePopup?.() + hideLoader() props.fetchData() }) }