feat: 优化空容器展示
This commit is contained in:
@@ -9,12 +9,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="new-survey-container" v-loading="requestLoading">
|
<div class="new-survey-container" v-loading="requestLoading">
|
||||||
<div style="margin-bottom: 80px">
|
<div style="margin-bottom: 80px">
|
||||||
<van-list
|
<van-list @load="handleLoadSurveys" v-model:loading="loading" :finished="finished">
|
||||||
@load="handleLoadSurveys"
|
<template #finished>
|
||||||
v-model:loading="loading"
|
<!-- 如果问卷大于0的话,显示没有更多了 -->
|
||||||
:finished="finished"
|
<!-- 如果问卷等于0的话,显示空容器 -->
|
||||||
finished-text="没有更多了"
|
<span v-if="survey.length > 0">
|
||||||
>
|
<el-text>没有更多了</el-text>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<div v-for="item in survey" v-if="survey.length > 0" :key="item" class="new-survey_item">
|
<div v-for="item in survey" v-if="survey.length > 0" :key="item" class="new-survey_item">
|
||||||
<survey-item :survey="item" :is-analysis="true" :disable-action-button="false" />
|
<survey-item :survey="item" :is-analysis="true" :disable-action-button="false" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ async function fetchSurveys(form: any) {
|
|||||||
if (survey.value.length >= total.value) {
|
if (survey.value.length >= total.value) {
|
||||||
finished.value = true;
|
finished.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Toast()
|
// Toast()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user