取消鼠标悬浮消失

This commit is contained in:
fan 2022-07-22 18:04:12 +08:00
parent 2c6807debf
commit fdb071c9f6

View File

@ -23,9 +23,9 @@ export default {
topic: '/user/queue/training',
stomp: null,
currentMap: null,
ierval: null,
// ierval: null,
mouseNum: 1,
mouseNumTime: 0,
// mouseNumTime: 0,
mapBoxP: null,
mode: '',
groupModel: ''
@ -78,7 +78,7 @@ export default {
this.mode = this.$route.params.mode || '';
this.currentMap = this.$refs.mapCommon;
this.groupModel = this.$route.query.group;
this.checkMouseStatusTimer(); //
// this.checkMouseStatusTimer(); //
this.$nextTick(() => {
setTimeout(() => {
this.$store.dispatch('config/resetCanvasOffset');
@ -88,7 +88,7 @@ export default {
beforeDestroy() {
this.clearSubscribe();
this.clearSubscribeNew();
this.clearAllTimer();
// this.clearAllTimer();
},
methods: {
async mapViewLoaded(loading) {
@ -161,33 +161,33 @@ export default {
this.mouseNum = 1;
},
// 线
clearAllTimer() {
if (this.ierval) {
clearInterval(this.ierval);
this.ierval = null;
}
},
// clearAllTimer() {
// if (this.ierval) {
// clearInterval(this.ierval);
// this.ierval = null;
// }
// },
//
checkMouseStatusTimer() {
if (this.ierval) {
clearInterval(this.ierval);
}
this.ierval = setInterval(() => {
if (this.mouseNum) {
this.mouseNum = 0;
this.mouseNumTime = 0;
if (this.mapBoxP) {
this.mapBoxP.style.cursor = this.mapBoxP.style.cursor != 'none' ? this.mapBoxP.style.cursor : '';
}
} else {
this.mouseNumTime += 1;
}
if (this.mapBoxP) {
if (this.mouseNumTime >= 12) {
this.mapBoxP.style.cursor = 'none';
}
}
}, 1000);
// if (this.ierval) {
// clearInterval(this.ierval);
// }
// this.ierval = setInterval(() => {
// if (this.mouseNum) {
// this.mouseNum = 0;
// this.mouseNumTime = 0;
// if (this.mapBoxP) {
// this.mapBoxP.style.cursor = this.mapBoxP.style.cursor != 'none' ? this.mapBoxP.style.cursor : '';
// }
// } else {
// this.mouseNumTime += 1;
// }
// if (this.mapBoxP) {
// if (this.mouseNumTime >= 12) {
// this.mapBoxP.style.cursor = 'none';
// }
// }
// }, 1000);
},
initMemberUserInfo(isFirst = false) {
if (this.$route.query.newApi + '' === 'true') {