mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-07 22:55:35 +00:00
fix: 通知消息一直未读的情况
This commit is contained in:
parent
a13da976ae
commit
277869c9d1
@ -91,7 +91,28 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
source: {
|
||||||
|
handler() {
|
||||||
|
this.msgRead();
|
||||||
|
},
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
|
windowActive(active) {
|
||||||
|
if (active) {
|
||||||
|
this.msgRead();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
msgRead() {
|
||||||
|
if (!this.windowActive) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$store.dispatch("dialogMsgRead", this.source);
|
||||||
|
},
|
||||||
|
|
||||||
onViewTag() {
|
onViewTag() {
|
||||||
this.onViewReply({
|
this.onViewReply({
|
||||||
msg_id: this.source.id,
|
msg_id: this.source.id,
|
||||||
|
|||||||
@ -190,7 +190,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['loads', 'audioPlaying', 'windowActive']),
|
...mapState(['loads', 'audioPlaying']),
|
||||||
...mapGetters(['isLoad']),
|
...mapGetters(['isLoad']),
|
||||||
|
|
||||||
isLoading() {
|
isLoading() {
|
||||||
@ -259,17 +259,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
msgData: {
|
|
||||||
handler() {
|
|
||||||
this.msgRead();
|
|
||||||
},
|
|
||||||
immediate: true,
|
|
||||||
},
|
|
||||||
windowActive(active) {
|
|
||||||
if (active) {
|
|
||||||
this.msgRead();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
operateAction(val) {
|
operateAction(val) {
|
||||||
this.operateEnter = false;
|
this.operateEnter = false;
|
||||||
if (val) {
|
if (val) {
|
||||||
@ -285,13 +274,6 @@ export default {
|
|||||||
this.$emit("on-longpress", {event, el, msgData: this.msgData})
|
this.$emit("on-longpress", {event, el, msgData: this.msgData})
|
||||||
},
|
},
|
||||||
|
|
||||||
msgRead() {
|
|
||||||
if (!this.windowActive) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.$store.dispatch("dialogMsgRead", this.msgData);
|
|
||||||
},
|
|
||||||
|
|
||||||
openReadPercentage() {
|
openReadPercentage() {
|
||||||
if (this.popperLoad > 0) {
|
if (this.popperLoad > 0) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user