From 9e70e9ca093d751cb494a14440084df6523fe709 Mon Sep 17 00:00:00 2001 From: dingxs Date: Mon, 19 Jun 2023 14:35:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=E6=97=B6=E9=97=B4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=99=A8=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Informations/Inputs/InputsDate/config.ts | 13 +- .../Informations/Inputs/InputsDate/config.vue | 135 ++++++++++++++++-- .../Informations/Inputs/InputsDate/index.vue | 135 ++++++++++++------ .../Inputs/InputsDate/interact.ts | 31 ++++ 4 files changed, 255 insertions(+), 59 deletions(-) mode change 100644 => 100755 src/packages/components/Informations/Inputs/InputsDate/config.ts mode change 100644 => 100755 src/packages/components/Informations/Inputs/InputsDate/config.vue mode change 100644 => 100755 src/packages/components/Informations/Inputs/InputsDate/index.vue mode change 100644 => 100755 src/packages/components/Informations/Inputs/InputsDate/interact.ts diff --git a/src/packages/components/Informations/Inputs/InputsDate/config.ts b/src/packages/components/Informations/Inputs/InputsDate/config.ts old mode 100644 new mode 100755 index e8f1d233..02b639c6 --- a/src/packages/components/Informations/Inputs/InputsDate/config.ts +++ b/src/packages/components/Informations/Inputs/InputsDate/config.ts @@ -4,7 +4,7 @@ import { PublicConfigClass } from '@/packages/public' import { CreateComponentType } from '@/packages/index.d' import { chartInitConfig } from '@/settings/designSetting' import { COMPONENT_INTERACT_EVENT_KET } from '@/enums/eventEnum' -import { interactActions, ComponentInteractEventEnum } from './interact' +import { interactActions, ComponentInteractEventEnum, DefaultTypeEnum, DifferUnitEnum } from './interact' import { InputsDateConfig } from './index' export const option = { @@ -12,9 +12,14 @@ export const option = { [COMPONENT_INTERACT_EVENT_KET]: ComponentInteractEventEnum.DATE, // 下拉展示 isPanel: 0, - dataset: dayjs().valueOf(), - differValue: 0 - + // 默认值 + dataset: dayjs().valueOf() as number | number[] | null, + // 默认值类型 + defaultType: DefaultTypeEnum.STATIC, + // 动态默认值偏移单位 + differUnit: [DifferUnitEnum.DAY, DifferUnitEnum.DAY], + // 动态默认值偏移值 + differValue: [0, 0] } export default class Config extends PublicConfigClass implements CreateComponentType { diff --git a/src/packages/components/Informations/Inputs/InputsDate/config.vue b/src/packages/components/Informations/Inputs/InputsDate/config.vue old mode 100644 new mode 100755 index 0d806518..8fa9adaf --- a/src/packages/components/Informations/Inputs/InputsDate/config.vue +++ b/src/packages/components/Informations/Inputs/InputsDate/config.vue @@ -8,39 +8,67 @@ - + - - - + + + + - + + + + + + + - - - + + + + + + + + + + + + + + + + + diff --git a/src/packages/components/Informations/Inputs/InputsDate/index.vue b/src/packages/components/Informations/Inputs/InputsDate/index.vue old mode 100644 new mode 100755 index 3800590f..a8e16bc1 --- a/src/packages/components/Informations/Inputs/InputsDate/index.vue +++ b/src/packages/components/Informations/Inputs/InputsDate/index.vue @@ -1,6 +1,7 @@