| | |
| | | // 退出登录 |
| | | outLogin() { |
| | | sessionStorage.clear() |
| | | this.$router.replace({ path: "/login" }); |
| | | this.$router.replace({ path: "/" }); |
| | | }, |
| | | // 关闭标签 |
| | | closeTag(tag) { |
| | |
| | | }, |
| | | // 跳转标签 |
| | | goTag(tag) { |
| | | this.$router.push(tag.path) |
| | | this.$router.push({ |
| | | path: tag.path, |
| | | query: tag.query |
| | | }) |
| | | }, |
| | | handleWheel(e) { |
| | | if (this.scrollTimer) { |
| | | this.scrollAmount += e.deltaY; |
| | | return; |
| | | } |
| | | |
| | | |
| | | const container = e.currentTarget; |
| | | this.scrollAmount = e.deltaY; |
| | | |
| | | |
| | | const scroll = () => { |
| | | container.scrollLeft += this.scrollAmount * 1.2; // 增加滚动速度 |
| | | this.scrollAmount = 0; |
| | | this.scrollTimer = null; |
| | | }; |
| | | |
| | | |
| | | this.scrollTimer = setTimeout(scroll, 8); // 减少延迟时间 |
| | | } |
| | | }, |