| | |
| | | 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' |
| | | } |
| | | } |
| | | }, |
| | |
| | | |
| | | 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' |