|
@@ -1,6 +1,9 @@
|
|
|
<template>
|
|
|
- <div class="contentBody" v-if="learnChildList.length > 0">
|
|
|
- <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
|
|
|
+ <div class="contentBody" >
|
|
|
+ <div class="childLoading" v-if="childLoading">
|
|
|
+ <van-loading type="spinner" vertical >加载中...</van-loading>
|
|
|
+ </div>
|
|
|
+ <van-pull-refresh v-else v-model="isLoading" @refresh="onRefresh">
|
|
|
<van-tabs
|
|
|
:active="active"
|
|
|
type="line"
|
|
@@ -117,6 +120,7 @@ export default {
|
|
|
choosedChildIndex: 0,
|
|
|
contentList: [],
|
|
|
loading: false,
|
|
|
+ childLoading: true, // 子目录加载
|
|
|
finished: false,
|
|
|
learnChildList: [],
|
|
|
learnPage: 0,
|
|
@@ -157,8 +161,10 @@ export default {
|
|
|
this.learnChildList = res.data;
|
|
|
this.$store.commit("toggleLoading", false);
|
|
|
this.learnPage = 0;
|
|
|
+ this.childLoading = false;
|
|
|
})
|
|
|
.catch(() => {
|
|
|
+ this.childLoading = false;
|
|
|
this.$store.commit("toggleLoading", false);
|
|
|
});
|
|
|
},
|
|
@@ -238,6 +244,12 @@ export default {
|
|
|
@import "~@/styles/mixin";
|
|
|
.contentBody {
|
|
|
background-color: #fff;
|
|
|
+ .childLoading {
|
|
|
+ height: 85vh;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
.contentItemDiv {
|
|
|
width: 100%;
|
|
|
.contentItemTitle {
|