diff --git a/src/packages/components/Informations/Texts/TextCommon/config.ts b/src/packages/components/Informations/Texts/TextCommon/config.ts index e71a8158..d2aba30a 100644 --- a/src/packages/components/Informations/Texts/TextCommon/config.ts +++ b/src/packages/components/Informations/Texts/TextCommon/config.ts @@ -5,22 +5,23 @@ import cloneDeep from 'lodash/cloneDeep' export enum WritingModeEnum { HORIZONTAL = '水平', - VERTICAL = '垂直', + VERTICAL = '垂直' } export const WritingModeObject = { [WritingModeEnum.HORIZONTAL]: 'horizontal-tb', - [WritingModeEnum.VERTICAL]: 'vertical-rl', + [WritingModeEnum.VERTICAL]: 'vertical-rl' } export const option = { - link:'', - linkHead:'http://', + link: '', + linkHead: 'http://', dataset: '我是文本', fontSize: 20, fontColor: '#ffffff', paddingX: 10, paddingY: 10, + textAlign: 'center', // 水平对齐方式 // 边框 borderWidth: 0, @@ -30,11 +31,10 @@ export const option = { // 字间距 letterSpacing: 5, writingMode: 'horizontal-tb', - backgroundColor: '#00000000', + backgroundColor: '#00000000' } -export default class Config extends PublicConfigClass implements CreateComponentType -{ +export default class Config extends PublicConfigClass implements CreateComponentType { public key = TextCommonConfig.key public chartConfig = cloneDeep(TextCommonConfig) public option = cloneDeep(option) diff --git a/src/packages/components/Informations/Texts/TextCommon/config.vue b/src/packages/components/Informations/Texts/TextCommon/config.vue index 07a9d95e..aa912e57 100644 --- a/src/packages/components/Informations/Texts/TextCommon/config.vue +++ b/src/packages/components/Informations/Texts/TextCommon/config.vue @@ -23,26 +23,30 @@ + + + - - - - + + + + + + + + - - - @@ -86,6 +90,12 @@ const props = defineProps({ } }) +const textAlignOptions = [ + { label: '左对齐', value: 'start' }, + { label: '居中', value: 'center' }, + { label: '右对齐', value: 'end' } +] + const verticalOptions = [ { label: WritingModeEnum.HORIZONTAL, @@ -100,13 +110,7 @@ const handleLinkClick = () => { window.open(props.optionData.linkHead + props.optionData.link) } const linkHeadOptions = [ - { - label: 'http://', - value: 'http://' - }, - { - label: 'https://', - value: 'https://' - } + { label: 'http://', value: 'http://' }, + { label: 'https://', value: 'https://' } ] diff --git a/src/packages/components/Informations/Texts/TextCommon/index.vue b/src/packages/components/Informations/Texts/TextCommon/index.vue index b2f7f4fe..5a263972 100644 --- a/src/packages/components/Informations/Texts/TextCommon/index.vue +++ b/src/packages/components/Informations/Texts/TextCommon/index.vue @@ -1,8 +1,8 @@