取消鼠标悬浮消失
This commit is contained in:
parent
2c6807debf
commit
fdb071c9f6
@ -23,9 +23,9 @@ export default {
|
|||||||
topic: '/user/queue/training',
|
topic: '/user/queue/training',
|
||||||
stomp: null,
|
stomp: null,
|
||||||
currentMap: null,
|
currentMap: null,
|
||||||
ierval: null,
|
// ierval: null,
|
||||||
mouseNum: 1,
|
mouseNum: 1,
|
||||||
mouseNumTime: 0,
|
// mouseNumTime: 0,
|
||||||
mapBoxP: null,
|
mapBoxP: null,
|
||||||
mode: '',
|
mode: '',
|
||||||
groupModel: ''
|
groupModel: ''
|
||||||
@ -78,7 +78,7 @@ export default {
|
|||||||
this.mode = this.$route.params.mode || '';
|
this.mode = this.$route.params.mode || '';
|
||||||
this.currentMap = this.$refs.mapCommon;
|
this.currentMap = this.$refs.mapCommon;
|
||||||
this.groupModel = this.$route.query.group;
|
this.groupModel = this.$route.query.group;
|
||||||
this.checkMouseStatusTimer(); // 鼠标样式变化检测
|
// this.checkMouseStatusTimer(); // 鼠标样式变化检测
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$store.dispatch('config/resetCanvasOffset');
|
this.$store.dispatch('config/resetCanvasOffset');
|
||||||
@ -88,7 +88,7 @@ export default {
|
|||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.clearSubscribe();
|
this.clearSubscribe();
|
||||||
this.clearSubscribeNew();
|
this.clearSubscribeNew();
|
||||||
this.clearAllTimer();
|
// this.clearAllTimer();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async mapViewLoaded(loading) {
|
async mapViewLoaded(loading) {
|
||||||
@ -161,33 +161,33 @@ export default {
|
|||||||
this.mouseNum = 1;
|
this.mouseNum = 1;
|
||||||
},
|
},
|
||||||
// 清除检查在线定时器
|
// 清除检查在线定时器
|
||||||
clearAllTimer() {
|
// clearAllTimer() {
|
||||||
if (this.ierval) {
|
// if (this.ierval) {
|
||||||
clearInterval(this.ierval);
|
// clearInterval(this.ierval);
|
||||||
this.ierval = null;
|
// this.ierval = null;
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
// 设置手标显示状态
|
// 设置手标显示状态
|
||||||
checkMouseStatusTimer() {
|
checkMouseStatusTimer() {
|
||||||
if (this.ierval) {
|
// if (this.ierval) {
|
||||||
clearInterval(this.ierval);
|
// clearInterval(this.ierval);
|
||||||
}
|
// }
|
||||||
this.ierval = setInterval(() => {
|
// this.ierval = setInterval(() => {
|
||||||
if (this.mouseNum) {
|
// if (this.mouseNum) {
|
||||||
this.mouseNum = 0;
|
// this.mouseNum = 0;
|
||||||
this.mouseNumTime = 0;
|
// this.mouseNumTime = 0;
|
||||||
if (this.mapBoxP) {
|
// if (this.mapBoxP) {
|
||||||
this.mapBoxP.style.cursor = this.mapBoxP.style.cursor != 'none' ? this.mapBoxP.style.cursor : '';
|
// this.mapBoxP.style.cursor = this.mapBoxP.style.cursor != 'none' ? this.mapBoxP.style.cursor : '';
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
this.mouseNumTime += 1;
|
// this.mouseNumTime += 1;
|
||||||
}
|
// }
|
||||||
if (this.mapBoxP) {
|
// if (this.mapBoxP) {
|
||||||
if (this.mouseNumTime >= 12) {
|
// if (this.mouseNumTime >= 12) {
|
||||||
this.mapBoxP.style.cursor = 'none';
|
// this.mapBoxP.style.cursor = 'none';
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}, 1000);
|
// }, 1000);
|
||||||
},
|
},
|
||||||
initMemberUserInfo(isFirst = false) {
|
initMemberUserInfo(isFirst = false) {
|
||||||
if (this.$route.query.newApi + '' === 'true') {
|
if (this.$route.query.newApi + '' === 'true') {
|
||||||
|
Loading…
Reference in New Issue
Block a user