|
@@ -477,6 +477,10 @@ onlineChart: null,
|
|
|
}, 2200);
|
|
}, 2200);
|
|
|
|
|
|
|
|
window.addEventListener("resize", this.onResize, { passive: true });
|
|
window.addEventListener("resize", this.onResize, { passive: true });
|
|
|
|
|
+
|
|
|
|
|
+ this.timer = setTimeout(() => {
|
|
|
|
|
+ this.isNavVisible = false;
|
|
|
|
|
+ }, 2000); // 2000毫秒(2秒)后收起底部菜单
|
|
|
},
|
|
},
|
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
|
window.removeEventListener("resize", this.updateScale);
|
|
window.removeEventListener("resize", this.updateScale);
|
|
@@ -490,11 +494,6 @@ onlineChart: null,
|
|
|
// 组件销毁前清除定时器,防止内存泄漏
|
|
// 组件销毁前清除定时器,防止内存泄漏
|
|
|
if (this.timer) clearTimeout(this.timer);
|
|
if (this.timer) clearTimeout(this.timer);
|
|
|
},
|
|
},
|
|
|
- mounted () {
|
|
|
|
|
- this.timer = setTimeout(() => {
|
|
|
|
|
- this.isNavVisible = false;
|
|
|
|
|
- }, 2000); // 2000毫秒(2秒)后收起底部菜单
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
onMouseMove(e) {
|
|
onMouseMove(e) {
|
|
|
const rect = this.$el.getBoundingClientRect();
|
|
const rect = this.$el.getBoundingClientRect();
|