From 3dc278f10a4c3e3db7ce3a445bed710bdc88916e Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Wed, 16 Nov 2022 17:10:51 +0800
Subject: [PATCH] 基地信息坐标有误差的问题
---
src/components/timeLine/index.vue | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/components/timeLine/index.vue b/src/components/timeLine/index.vue
index fce5382..dd1eeef 100644
--- a/src/components/timeLine/index.vue
+++ b/src/components/timeLine/index.vue
@@ -468,10 +468,8 @@
watch: {
currentInd: {
handler (newName, oldName) {
- if (newName == 0) {
- this.$refs.TimePointer.style.left = 0 + 14 + 'px'
- this.$refs.TextPopup.style.left = 0 - 38 + 'px'
- }
+ this.$refs.TimePointer.style.left = parseInt(newName)*48+2 + 14 + 'px'
+ this.$refs.TextPopup.style.left = parseInt(newName)*48+2 - 38 + 'px'
}
}
},
@@ -544,11 +542,12 @@
this.currentObj = item
this.currentInd = index
-
if (parseInt(this.$refs.mytimeline.style.left) < 0) {
+
this.$refs.TimePointer.style.left = e.target.offsetLeft + parseInt(this.$refs.mytimeline.style.left) + 14 + 'px'
this.$refs.TextPopup.style.left = e.target.offsetLeft + parseInt(this.$refs.mytimeline.style.left) - 38 + 'px'
} else {
+
if (e.target.offsetLeft <= 480) {
this.$refs.TimePointer.style.left = e.target.offsetLeft + 14 + 'px'
this.$refs.TextPopup.style.left = e.target.offsetLeft - 38 + 'px'
--
Gitblit v1.9.3