diff --git a/resources/assets/js/pages/manage/components/DialogView.vue b/resources/assets/js/pages/manage/components/DialogView.vue
index 0141e2b00..1c6fec061 100644
--- a/resources/assets/js/pages/manage/components/DialogView.vue
+++ b/resources/assets/js/pages/manage/components/DialogView.vue
@@ -48,30 +48,32 @@
@@ -102,6 +104,7 @@ export default {
data() {
return {
+ popperLoad: 0,
popperShow: false,
allList: [],
}
@@ -154,22 +157,6 @@ export default {
this.msgRead();
},
immediate: true,
- },
- popperShow(val) {
- if (val) {
- this.$store.dispatch("call", {
- url: 'dialog/msg/readlist',
- data: {
- msg_id: this.msgData.id,
- },
- }).then(({data}) => {
- this.allList = data;
- setTimeout(this.$refs.percent.updatePopper, 10)
- }).catch(() => {
- this.allList = [];
- setTimeout(this.$refs.percent.updatePopper, 10)
- });
- }
}
},
@@ -189,6 +176,32 @@ export default {
}, 50)
},
+ openReadPercentage() {
+ if (this.popperLoad > 0) {
+ return;
+ }
+ if (this.popperShow) {
+ this.popperShow = false;
+ return;
+ }
+ this.popperLoad++;
+ this.$store.dispatch("call", {
+ url: 'dialog/msg/readlist',
+ data: {
+ msg_id: this.msgData.id,
+ },
+ }).then(({data}) => {
+ this.allList = data;
+ }).catch(() => {
+ this.allList = [];
+ }).finally(_ => {
+ setTimeout(() => {
+ this.popperLoad--;
+ this.popperShow = true
+ }, 100)
+ });
+ },
+
textMsg(text) {
if (!text) {
return ""