แก้ไข loader
This commit is contained in:
parent
f072224851
commit
b663eedb09
147 changed files with 3095 additions and 3256 deletions
|
|
@ -113,7 +113,7 @@ import { onMounted, ref } from "vue";
|
|||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useDataStore } from "@/stores/data";
|
||||
|
||||
import { useQuasar } from "quasar";
|
||||
|
||||
const props = defineProps({
|
||||
|
|
@ -129,9 +129,8 @@ const props = defineProps({
|
|||
|
||||
const $q = useQuasar();
|
||||
const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง
|
||||
const { messageError, date2Thai } = mixin;
|
||||
const dataStore = useDataStore();
|
||||
const { loaderPage } = dataStore;
|
||||
const { messageError, date2Thai, showLoader, hideLoader } = mixin;
|
||||
|
||||
const fullName = ref<string>("");
|
||||
const examNumber = ref<string>("");
|
||||
const citizenId = ref<string>("");
|
||||
|
|
@ -152,7 +151,7 @@ onMounted(async () => {
|
|||
});
|
||||
|
||||
const fetchCard = async () => {
|
||||
loaderPage(true);
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.candidateCard(props.candidateId))
|
||||
.then((res) => {
|
||||
|
|
@ -194,7 +193,7 @@ const fetchCard = async () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
loaderPage(false);
|
||||
hideLoader();
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue