搜也刷新优化

This commit is contained in:
2026-09-23 18:28:38 +08:00
parent d4d0df4519
commit 76eea1adbe
2 changed files with 26 additions and 9 deletions
+11 -5
View File
@@ -1,15 +1,15 @@
<template>
<view class="page msg edge">
<fy-header :title="unread ? ('消息(' + unread + ')') : '消息'">
<fy-header title="消息" :extra="unreadLabel">
<template #right>
<text class="ico" @click="plus"></text>
</template>
</fy-header>
<view class="finder" @click="goSearch">
<wd-icon name="search" size="28rpx" color="#9CA3AF" />
<text class="finder-txt">搜索</text>
</view>
<fy-scroll class="edge-scroll list" dock @refresh="reload">
<view class="finder" @click="goSearch">
<wd-icon name="search" size="28rpx" color="#9CA3AF" />
<text class="finder-txt">搜索</text>
</view>
<view v-if="!rows.length" class="empty">暂无会话</view>
<view
v-for="c in rows"
@@ -52,6 +52,12 @@ export default {
data() {
return { rows: [], unread: 0, off: null }
},
computed: {
unreadLabel() {
if (!this.unread) return ''
return '(' + (this.unread > 99 ? '99+' : this.unread) + ')'
}
},
onShow() {
if (this.off) this.off()
this.guard()