Commit 3519748c authored by wcmoon's avatar wcmoon

feat: emtpy search result

parent 2e1ba659
......@@ -69,7 +69,7 @@ export default {
});
this.total = res.data.total;
if (refresh) {
this.passList = res.data.results;
this.passList = res.data.results || [];
} else {
this.passList = this.passList.concat(res.data.results);
}
......
<template>
<div>
<el-table
v-if="passList.length > 0"
:data="passList"
:height="tableHeight"
v-load-more.expand="{func: next, target: '.el-table__body-wrapper', delay: 500}"
......@@ -46,6 +47,10 @@
</template>
</el-table-column>
</el-table>
<div class="empty" v-else>
<img src="../../assets/images/pass/empty.png" alt="">
<span>搜索无结果</span>
</div>
<!-- 转账弹窗-->
<common-dialog showMask v-if="passShow" @closePopup="passShow = false">
<transfer-pass @update="$emit('update', curItem.id, curItem.balance)" :content="curItem" @closePopup="passShow = false"></transfer-pass>
......@@ -184,4 +189,24 @@ export default {
font-size: 12px;
font-weight: normal;
}
.empty {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: calc(100vh - 145px);
img {
width: 134px;
height: 113px;
margin-bottom: 6px;
}
span {
font-size: 14px;
color: #929292;
line-height: 20px;
}
}
</style>
......@@ -66,7 +66,7 @@ export default {
});
this.total = res.data.total;
if (refresh) {
this.transferList = res.data.results;
this.transferList = res.data.results || [];
} else {
this.transferList = this.transferList.concat(res.data.results);
}
......
<template>
<div>
<el-table
v-if="transferList.length > 0"
:data="transferList"
:height="tableHeight"
v-load-more.expand="{func: next, target: '.el-table__body-wrapper', delay: 500}"
......@@ -35,6 +36,10 @@
</template>
</el-table-column>
</el-table>
<div class="empty" v-else>
<img src="../../assets/images/pass/empty.png" alt="">
<span>搜索无结果</span>
</div>
</div>
</template>
......@@ -159,6 +164,26 @@ export default {
font-size: 12px;
font-weight: normal;
}
.empty {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: calc(100vh - 145px);
img {
width: 134px;
height: 113px;
margin-bottom: 6px;
}
span {
font-size: 14px;
color: #929292;
line-height: 20px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment