From 144ef06cd127e02ffbc9d7f013960c6de67d7161 Mon Sep 17 00:00:00 2001 From: tnt group Date: Thu, 29 Sep 2022 10:34:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=80=92=E8=AE=A1?= =?UTF-8?q?=E6=97=B6=E7=BB=84=E4=BB=B6(=E6=B5=8B=E8=AF=95=E4=B8=AD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Decorates/Mores/CountDown/config.ts | 38 +++++++++ .../Decorates/Mores/CountDown/config.vue | 68 ++++++++++++++++ .../Decorates/Mores/CountDown/index.ts | 14 ++++ .../Decorates/Mores/CountDown/index.vue | 77 +++++++++++++++++++ .../components/Decorates/Mores/index.ts | 3 +- 5 files changed, 199 insertions(+), 1 deletion(-) create mode 100644 src/packages/components/Decorates/Mores/CountDown/config.ts create mode 100644 src/packages/components/Decorates/Mores/CountDown/config.vue create mode 100644 src/packages/components/Decorates/Mores/CountDown/index.ts create mode 100644 src/packages/components/Decorates/Mores/CountDown/index.vue diff --git a/src/packages/components/Decorates/Mores/CountDown/config.ts b/src/packages/components/Decorates/Mores/CountDown/config.ts new file mode 100644 index 00000000..ee3c5193 --- /dev/null +++ b/src/packages/components/Decorates/Mores/CountDown/config.ts @@ -0,0 +1,38 @@ +import { PublicConfigClass } from '@/packages/public' +import { CreateComponentType } from '@/packages/index.d' +import { CountDownConfig } from './index' +import cloneDeep from 'lodash/cloneDeep' +import { chartInitConfig } from '@/settings/designSetting' + +export enum FontWeightEnum { + NORMAL = '常规', + BOLD = '加粗' +} + +export const FontWeightObject = { + [FontWeightEnum.NORMAL]: 'normal', + [FontWeightEnum.BOLD]: 'bold' +} + +export const option = { + // 数据说明 + timeSize: 24, + timeLineHeight: 50, + timeTextIndent: 2, + timeColor: '#E6F7FF', + fontWeight: 'normal', + + //阴影 + showShadow: true, + hShadow: 0, + vShadow: 0, + blurShadow: 8, + colorShadow: '#0075ff' +} + +export default class Config extends PublicConfigClass implements CreateComponentType { + public key = CountDownConfig.key + public attr = { ...chartInitConfig, w: 300, h: 200, zIndex: -1 } + public chartConfig = cloneDeep(CountDownConfig) + public option = cloneDeep(option) +} diff --git a/src/packages/components/Decorates/Mores/CountDown/config.vue b/src/packages/components/Decorates/Mores/CountDown/config.vue new file mode 100644 index 00000000..208cbedb --- /dev/null +++ b/src/packages/components/Decorates/Mores/CountDown/config.vue @@ -0,0 +1,68 @@ + + diff --git a/src/packages/components/Decorates/Mores/CountDown/index.ts b/src/packages/components/Decorates/Mores/CountDown/index.ts new file mode 100644 index 00000000..b745355c --- /dev/null +++ b/src/packages/components/Decorates/Mores/CountDown/index.ts @@ -0,0 +1,14 @@ +import image from '@/assets/images/chart/decorates/time.png' +import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d' +import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d' + +export const CountDownConfig: ConfigType = { + key: 'CountDown', + chartKey: 'VCountDown', + conKey: 'VCCountDown', + title: '倒计时', + category: ChatCategoryEnum.MORE, + categoryName: ChatCategoryEnumName.MORE, + package: PackagesCategoryEnum.DECORATES, + image +} diff --git a/src/packages/components/Decorates/Mores/CountDown/index.vue b/src/packages/components/Decorates/Mores/CountDown/index.vue new file mode 100644 index 00000000..d151fe9a --- /dev/null +++ b/src/packages/components/Decorates/Mores/CountDown/index.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/src/packages/components/Decorates/Mores/index.ts b/src/packages/components/Decorates/Mores/index.ts index 9aff3b7d..bc6a3849 100644 --- a/src/packages/components/Decorates/Mores/index.ts +++ b/src/packages/components/Decorates/Mores/index.ts @@ -1,5 +1,6 @@ import { NumberConfig } from './Number/index' import { TimeCommonConfig } from './TimeCommon/index' import { ClockConfig } from './Clock/index' +import { CountDownConfig } from './CountDown/index' -export default [TimeCommonConfig, NumberConfig, ClockConfig] +export default [TimeCommonConfig, CountDownConfig, NumberConfig, ClockConfig]