fix:load skeleton
This commit is contained in:
parent
7cdff8d853
commit
cacb84bb48
20 changed files with 894 additions and 309 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -13,6 +13,8 @@ import type {
|
|||
Scholarship,
|
||||
} from "@/modules/09_scholarship/interface/index/Main";
|
||||
|
||||
import SkeletonTable from "@/components/SkeletonTable.vue";
|
||||
|
||||
const mixin = useCounterMixin();
|
||||
const { showLoader, hideLoader, messageError } = mixin;
|
||||
const router = useRouter();
|
||||
|
|
@ -24,6 +26,7 @@ const currentPage = ref<number>(1);
|
|||
const page = ref<number>(1);
|
||||
const rowsPerPage = ref<number>(10);
|
||||
|
||||
const isLoad = ref<boolean>(false);
|
||||
const rows = ref<Scholarship[]>([]);
|
||||
const year = ref<number>(0);
|
||||
const type = ref<string>("DOMESTICE");
|
||||
|
|
@ -127,15 +130,16 @@ async function getProfileId() {
|
|||
if (dataStore.profileId) {
|
||||
profilId.value = dataStore.profileId;
|
||||
} else {
|
||||
showLoader();
|
||||
isLoad.value = true;
|
||||
try {
|
||||
const res = await http.get(config.API.profilePosition());
|
||||
dataStore.profileId = res.data.result.profileId;
|
||||
profilId.value = dataStore.profileId;
|
||||
isLoad.value = false;
|
||||
} catch (e) {
|
||||
messageError($q, e);
|
||||
} finally {
|
||||
hideLoader();
|
||||
isLoad.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -255,6 +259,7 @@ onMounted(async () => {
|
|||
|
||||
<div>
|
||||
<d-table
|
||||
v-if="!isLoad"
|
||||
flat
|
||||
bordered
|
||||
dense
|
||||
|
|
@ -339,6 +344,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</template>
|
||||
</d-table>
|
||||
<SkeletonTable v-else :columns="columns" />
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue