|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="page-learn">
|
|
|
- <van-loading v-if="loading" type="spinner" vertical >加载中...</van-loading>
|
|
|
+ <van-loading class="loading" v-if="loading" type="spinner" vertical >加载中...</van-loading>
|
|
|
<van-tabs v-else :active="active" @click="rootChange" line-width="10px">
|
|
|
<!-- 根目录 -->
|
|
|
<van-tab v-for="(item, index) in learnRootList" :key="index" :title="item.name">
|
|
@@ -49,6 +49,7 @@ export default {
|
|
|
this.learnRootList = [...this.learnRootList, ...res.data];
|
|
|
// 查询子目录
|
|
|
if (this.choosedRootIndex === 0) {
|
|
|
+ this.loading = false;
|
|
|
return;
|
|
|
}
|
|
|
this.getChildList();
|
|
@@ -77,4 +78,12 @@ export default {
|
|
|
.contentBody {
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
+.page-learn{
|
|
|
+ .loading{
|
|
|
+ height: 85vh;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|