Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-06-02 22:31:24 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d3f394c93d066c701d8dbfcbe086042371c9ba4b
d3f394c9
1 parent
7941d2aa
✨ feat(视频审核页面): 没有列表数据时显示优化
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
src/views/business/auditVideo.vue
src/views/business/auditVideo.vue
View file @
d3f394c
<template>
<div class="">
<van-tabs v-model:active="active" sticky @click-tab="onClickTab" :color="styleColor.baseColor" background="#F7F7F7"
title-active-color="#222222" title-inactive-color="#777777">
<van-tabs v-model:active="active" sticky :color="styleColor.baseColor" background="#F7F7F7" title-active-color="#222222" title-inactive-color="#777777" @click-tab="onClickTab">
<van-tab title="待审核" :badge="prod_num" :title-style="titleStyle">
<template v-if="!active">
<van-list v-model:loading="loading" :finished="finished" :finished-text="finishedTextStatus ? '没有更多了' : ''" @load="onLoad">
<template v-for="item in prod_list" :key="item"
style="height: 3rem;"
>
<b-video-card :item="item" status="PENDING" @on-click="onClick"
></b-video-card
>
<template v-for="item in prod_list" :key="item">
<b-video-card :item="item" status="PENDING" @on-click="onClick"
/
>
</template>
</van-list>
</template>
...
...
@@ -14,18 +13,15 @@
<van-tab title="已审核" :title-style="titleStyle">
<template v-if="active">
<van-list v-model:loading="loading" :finished="finished" :finished-text="finishedTextStatus ? '没有更多了' : ''" @load="onLoad">
<template v-for="item in prod_list" :key="item"
style="height: 3rem;"
>
<b-video-card :item="item" status="PROCESS"
></b-video-card
>
<template v-for="item in prod_list" :key="item">
<b-video-card :item="item" status="PROCESS"
/
>
</template>
</van-list>
</template>
</van-tab>
</van-tabs>
<van-empty v-if="emptyStatus"
class="custom-image"
:image="no_image"
description="暂无审核信息"
/>
<van-empty v-if="emptyStatus" class="custom-image" :image="no_image" description="暂无审核信息" />
<div style="height: 5rem;" />
</div>
</template>
...
...
@@ -81,6 +77,9 @@ const finished = ref(false);
/**
* 向下滚动查询数据
*/
// 因为不能让空图标提前出来的写法
const emptyStatus = ref(false);
const finishedTextStatus = ref(false);
const onLoad = () => {
// 异步更新数据
axios.get('/srv/?a=check_prod_list', {
...
...
@@ -105,6 +104,11 @@ const onLoad = () => {
// 加载状态结束
finished.value = true;
}
//
if (!prod_list.value.length) {
finishedTextStatus.value = false;
emptyStatus.value = true;
}
} else {
console.warn(res);
if (!res.data.show) return false;
...
...
@@ -125,13 +129,6 @@ const onClick = (id) => {
_.remove(prod_list.value, item => item.id === id);
}
// 因为不能让空图标提前出来的写法
const finishedTextStatus = ref(false);
const emptyStatus = ref(false);
if (!prod_list.value.length) {
finishedTextStatus.value = false;
emptyStatus.value = true;
}
</script>
<style lang="less" scoped>
...
...
Please
register
or
login
to post a comment