|
@@ -60,7 +60,7 @@
|
|
|
<m-empty v-if="items.length === 0" description="暂无通知"></m-empty>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-badge class="cursor-pointer" slot="reference" :value="unreadTotal" :max="99" :hidden="unreadTotal === 0">
|
|
|
+ <el-badge class="cursor-pointer" slot="reference" :value="unreadTotal" :max="99" :hidden="unreadTotal <= 0">
|
|
|
<span class="el-icon-bell"></span>
|
|
|
</el-badge>
|
|
|
</el-popover>
|
|
@@ -169,7 +169,7 @@ export default {
|
|
|
async onSet (item) {
|
|
|
try {
|
|
|
await setMessageRead({ messageId: item.messageId })
|
|
|
- this.unreadTotal--
|
|
|
+ if (+this.unreadTotal > 0) this.unreadTotal--
|
|
|
item.readState = 1
|
|
|
} catch (error) {
|
|
|
this.$message.error(error)
|