fix:增加学习路径图loading

This commit is contained in:
wyx
2023-01-16 17:29:23 +08:00
parent 864d0637af
commit fe2ea2fdb9
2 changed files with 21 additions and 3 deletions

View File

@@ -56,7 +56,11 @@
</div>
</div>
<!-- 路径列表-->
<div :style="{ display: !showmapdetail ? 'flex' : 'none' }" class="head">
<div class="routerList" v-if="isLoading" style="display:flex;color:#909399;">
</div>
<div v-else :style="{ display: !showmapdetail ? 'flex' : 'none' }" class="head">
{{ loading.close() }}
<div style="min-width: 770px; width: 100%">
<el-table :data="data" style="width: 100%" @row-click="gofun">
<el-table-column prop="img" label="缩略图" #default="scope" align="center" width="255">
@@ -107,17 +111,30 @@ import {ROUTER_LIST,} from "@/api/api";
import {useRouter} from "vue-router";
import store from "@/store";
import PathDetailImage from "@/components/PathDetailImage.vue";
import { ElLoading } from 'element-plus';
const detail = ref();
const showmapdetail = ref(false);
const currentStageId = ref();
const userInfo = computed(() => store.state.userInfo);
const {data} = usePage(ROUTER_LIST, {pageSize: 60});
const loading = ref(false);
const isLoading = ref(true);
loading.value = ElLoading.service({
lock: true,
text: 'Loading',
background: 'rgba(0, 0, 0, 0.7)'
})
const {data} = usePage(ROUTER_LIST, {pageSize: 60}, (e)=>{
console.log('我请求成功了吗', e)
isLoading.value = false;
});
const router = useRouter();
const returnclick = () => {
router.back();
};
// const {unCompleteTaskList} = useRequest(ROUTER_UNCOMPLETE_LIST, {});
const returnfun = () => {