Commit 9135bfd51e3a32a266ffb2486a67ad4e2f45e734

Authored by xp.Huang
2 parents 1248c5ee fa609554

Merge branch 'fix/DEFECT-1606' into 'main_dev'

perf: 设置时间选择器默认为日期时间类型

See merge request yunteng/thingskit-view!124
@@ -9,23 +9,23 @@ import { OverrideInputsDateConfig } from './index' @@ -9,23 +9,23 @@ import { OverrideInputsDateConfig } from './index'
9 9
10 export const option = { 10 export const option = {
11 // 时间组件展示类型,必须和 interactActions 中定义的数据一致 11 // 时间组件展示类型,必须和 interactActions 中定义的数据一致
12 - [COMPONENT_INTERACT_EVENT_KET]: ComponentInteractEventEnum.DATE_RANGE,  
13 - // 下拉展示 12 + [COMPONENT_INTERACT_EVENT_KET]: ComponentInteractEventEnum.DATE_TIME_RANGE,
  13 + // 下拉展示
14 isPanel: 0, 14 isPanel: 0,
15 // 默认值 15 // 默认值
16 - dataset: [new Date().getTime() - 86400000,new Date().getTime()], 16 + dataset: [new Date().getTime() - 86400000, new Date().getTime()],
17 // 默认值类型 17 // 默认值类型
18 defaultType: DefaultTypeEnum.STATIC, 18 defaultType: DefaultTypeEnum.STATIC,
19 // 动态默认值偏移单位 19 // 动态默认值偏移单位
20 differUnit: [DifferUnitEnum.DAY, DifferUnitEnum.DAY], 20 differUnit: [DifferUnitEnum.DAY, DifferUnitEnum.DAY],
21 // 动态默认值偏移值 21 // 动态默认值偏移值
22 differValue: [0, 0], 22 differValue: [0, 0],
23 - shortcut: 24*60*60*1000 23 + shortcut: 24 * 60 * 60 * 1000
24 } 24 }
25 25
26 export default class Config extends PublicConfigClass implements CreateComponentType { 26 export default class Config extends PublicConfigClass implements CreateComponentType {
27 public key = OverrideInputsDateConfig.key 27 public key = OverrideInputsDateConfig.key
28 - public attr = { ...chartInitConfig, w: 260, h: 32, zIndex: 99999 } 28 + public attr = { ...chartInitConfig, w: 380, h: 32, zIndex: 99999 }
29 public chartConfig = cloneDeep(OverrideInputsDateConfig) 29 public chartConfig = cloneDeep(OverrideInputsDateConfig)
30 public interactActions = interactActions 30 public interactActions = interactActions
31 public option = cloneDeep(option) 31 public option = cloneDeep(option)