Commit f1b9a102f4df4c9c9e9e7e27036519af2ba496ef
1 parent
958216db
feat(src/packages): 信息下的控件 日期控件,修复选择的时间和预览时间不一致
Showing
1 changed file
with
15 additions
and
13 deletions
... | ... | @@ -146,6 +146,8 @@ watch( |
146 | 146 | date.add(newData.differValue[0], newData.differUnit[0]) |
147 | 147 | ).valueOf() |
148 | 148 | } |
149 | + }else if (newData.defaultType === DefaultTypeEnum.STATIC) { | |
150 | + option.dataset = props.chartConfig.option.dataset | |
149 | 151 | } |
150 | 152 | } |
151 | 153 | option.dataset = props.chartConfig.option.dataset |
... | ... | @@ -156,19 +158,19 @@ watch( |
156 | 158 | } |
157 | 159 | ) |
158 | 160 | |
159 | -watch( | |
160 | - () => props.chartConfig.option.shortcut, | |
161 | - newData => { | |
162 | - if (!newData) return | |
163 | - const startTs = Date.now() - newData | |
164 | - const endTs = Date.now() | |
165 | - option.dataset = [startTs, endTs] | |
166 | - onChange(option.dataset) | |
167 | - }, | |
168 | - { | |
169 | - immediate: true | |
170 | - } | |
171 | -) | |
161 | +// watch( | |
162 | +// () => props.chartConfig.option.shortcut, | |
163 | +// newData => { | |
164 | +// if (!newData) return | |
165 | +// const startTs = Date.now() - newData | |
166 | +// const endTs = Date.now() | |
167 | +// option.dataset = [startTs, endTs] | |
168 | +// onChange(option.dataset) | |
169 | +// }, | |
170 | +// { | |
171 | +// immediate: true | |
172 | +// } | |
173 | +// ) | |
172 | 174 | </script> |
173 | 175 | |
174 | 176 | <style lang="scss" scoped> | ... | ... |