Commit 3519748c authored by wcmoon's avatar wcmoon

feat: emtpy search result

parent 2e1ba659
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
}); });
this.total = res.data.total; this.total = res.data.total;
if (refresh) { if (refresh) {
this.passList = res.data.results; this.passList = res.data.results || [];
} else { } else {
this.passList = this.passList.concat(res.data.results); this.passList = this.passList.concat(res.data.results);
} }
......
<template> <template>
<div> <div>
<el-table <el-table
v-if="passList.length > 0"
:data="passList" :data="passList"
:height="tableHeight" :height="tableHeight"
v-load-more.expand="{func: next, target: '.el-table__body-wrapper', delay: 500}" v-load-more.expand="{func: next, target: '.el-table__body-wrapper', delay: 500}"
...@@ -46,6 +47,10 @@ ...@@ -46,6 +47,10 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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"> <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> <transfer-pass @update="$emit('update', curItem.id, curItem.balance)" :content="curItem" @closePopup="passShow = false"></transfer-pass>
...@@ -184,4 +189,24 @@ export default { ...@@ -184,4 +189,24 @@ export default {
font-size: 12px; font-size: 12px;
font-weight: normal; 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> </style>
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
}); });
this.total = res.data.total; this.total = res.data.total;
if (refresh) { if (refresh) {
this.transferList = res.data.results; this.transferList = res.data.results || [];
} else { } else {
this.transferList = this.transferList.concat(res.data.results); this.transferList = this.transferList.concat(res.data.results);
} }
......
<template> <template>
<div> <div>
<el-table <el-table
v-if="transferList.length > 0"
:data="transferList" :data="transferList"
:height="tableHeight" :height="tableHeight"
v-load-more.expand="{func: next, target: '.el-table__body-wrapper', delay: 500}" v-load-more.expand="{func: next, target: '.el-table__body-wrapper', delay: 500}"
...@@ -35,6 +36,10 @@ ...@@ -35,6 +36,10 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="empty" v-else>
<img src="../../assets/images/pass/empty.png" alt="">
<span>搜索无结果</span>
</div>
</div> </div>
</template> </template>
...@@ -159,6 +164,26 @@ export default { ...@@ -159,6 +164,26 @@ export default {
font-size: 12px; font-size: 12px;
font-weight: normal; 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> </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