diff --git a/src/packages/components/Informations/Texts/TextAuto/config.ts b/src/packages/components/Informations/Texts/TextAuto/config.ts new file mode 100644 index 00000000..a49135ad --- /dev/null +++ b/src/packages/components/Informations/Texts/TextAuto/config.ts @@ -0,0 +1,42 @@ +import { PublicConfigClass } from '@/packages/public' +import { CreateComponentType } from '@/packages/index.d' +import { TextAutoConfig } from './index' +import cloneDeep from 'lodash/cloneDeep' + +export enum WritingModeEnum { + HORIZONTAL = '水平', + VERTICAL = '垂直', +} + +export const WritingModeObject = { + [WritingModeEnum.HORIZONTAL]: 'horizontal-tb', + [WritingModeEnum.VERTICAL]: 'vertical-rl', +} + +export const option = { + dataset: '我是文本', + fontSize: 20, + fontColor: '#ffffff', + paddingX: 10, + paddingY: 10, + fontWeight: 400, + + // 边框 + borderWidth: 0, + borderColor: '#ffffff', + borderRadius: 5, + + // 字间距 + letterSpacing: 5, + backgroundColor: '#00000000', + + // 动画时长 + animation: 5, +} + +export default class Config extends PublicConfigClass implements CreateComponentType +{ + public key = TextAutoConfig.key + public chartConfig = cloneDeep(TextAutoConfig) + public option = cloneDeep(option) +} diff --git a/src/packages/components/Informations/Texts/TextAuto/config.vue b/src/packages/components/Informations/Texts/TextAuto/config.vue new file mode 100644 index 00000000..c8d8018a --- /dev/null +++ b/src/packages/components/Informations/Texts/TextAuto/config.vue @@ -0,0 +1,96 @@ + + + diff --git a/src/packages/components/Informations/Texts/TextAuto/index.ts b/src/packages/components/Informations/Texts/TextAuto/index.ts new file mode 100644 index 00000000..8b9a191a --- /dev/null +++ b/src/packages/components/Informations/Texts/TextAuto/index.ts @@ -0,0 +1,14 @@ +import image from '@/assets/images/chart/informations/text_static.png' +import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d' +import { ChatCategoryEnum,ChatCategoryEnumName } from '../../index.d' + +export const TextAutoConfig: ConfigType = { + key: 'TextAuto', + chartKey: 'VTextAuto', + conKey: 'VCTextAuto', + title: '滚动文字', + category: ChatCategoryEnum.TEXT, + categoryName: ChatCategoryEnumName.TEXT, + package: PackagesCategoryEnum.INFORMATIONS, + image +} diff --git a/src/packages/components/Informations/Texts/TextAuto/index.vue b/src/packages/components/Informations/Texts/TextAuto/index.vue new file mode 100644 index 00000000..9f00ae60 --- /dev/null +++ b/src/packages/components/Informations/Texts/TextAuto/index.vue @@ -0,0 +1,143 @@ + + + + + \ No newline at end of file diff --git a/src/packages/components/Informations/Texts/index.ts b/src/packages/components/Informations/Texts/index.ts index 960dcaef..1a53d285 100644 --- a/src/packages/components/Informations/Texts/index.ts +++ b/src/packages/components/Informations/Texts/index.ts @@ -1,5 +1,6 @@ import { TextCommonConfig } from './TextCommon/index' import { TextBarrageConfig } from './TextBarrage/index' import { TextGradientConfig } from './TextGradient/index' +import { TextAutoConfig } from './TextAuto' -export default [TextCommonConfig, TextGradientConfig, TextBarrageConfig] +export default [TextCommonConfig, TextGradientConfig, TextBarrageConfig, TextAutoConfig]