gunter-kgd 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<!--图表每个条块-->
|
|
2
2
|
<template>
|
|
3
3
|
<div
|
|
4
|
+
v-if="hasValidRange"
|
|
4
5
|
@mousemove.passive="showToast"
|
|
5
6
|
@mouseleave="hideToast"
|
|
6
7
|
@click.stop="handleClick"
|
|
@@ -57,6 +58,13 @@
|
|
|
57
58
|
toastRender: Function,
|
|
58
59
|
toastClass: String,
|
|
59
60
|
},
|
|
61
|
+
computed: {
|
|
62
|
+
hasValidRange(){
|
|
63
|
+
const start = this.current_data && this.current_data.start_time
|
|
64
|
+
const end = this.current_data && this.current_data.end_time
|
|
65
|
+
return Number(start) > 0 && Number(end) > 0
|
|
66
|
+
}
|
|
67
|
+
},
|
|
60
68
|
methods:{
|
|
61
69
|
handleClick(){
|
|
62
70
|
if(this.DragObject.mouseDown || this.justDragged){
|
|
@@ -138,6 +138,9 @@
|
|
|
138
138
|
if(!item || item.left == null || !this.scrollInfo.clientWidth){
|
|
139
139
|
return false
|
|
140
140
|
}
|
|
141
|
+
if(!(Number(item.start_time) > 0 && Number(item.end_time) > 0)){
|
|
142
|
+
return false
|
|
143
|
+
}
|
|
141
144
|
const { start, end } = this.getItemRange(item)
|
|
142
145
|
const barEnd = end || start
|
|
143
146
|
const padding = 20
|
|
@@ -157,6 +160,9 @@
|
|
|
157
160
|
if(!item || item.left == null || !this.scrollInfo.clientWidth){
|
|
158
161
|
return false
|
|
159
162
|
}
|
|
163
|
+
if(!(Number(item.start_time) > 0 && Number(item.end_time) > 0)){
|
|
164
|
+
return false
|
|
165
|
+
}
|
|
160
166
|
const { start, end } = this.getItemRange(item)
|
|
161
167
|
const barEnd = end || start
|
|
162
168
|
const padding = 20
|