2022-04-06 21:53:00 +08:00
|
|
|
import { publicConfig } from '@/packages/public'
|
|
|
|
import { CreateComponentType } from '@/packages/index.d'
|
|
|
|
import { TextCommonConfig } 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: '#ffffffff',
|
2022-04-24 20:02:22 +08:00
|
|
|
paddingX: 10,
|
|
|
|
paddingY: 10,
|
2022-04-06 21:53:00 +08:00
|
|
|
// 字间距
|
|
|
|
letterSpacing: 5,
|
2022-04-07 09:57:00 +08:00
|
|
|
borderRadius: 5,
|
2022-04-06 21:53:00 +08:00
|
|
|
writingMode: 'horizontal-tb',
|
|
|
|
backgroundColor: '#00000000',
|
|
|
|
}
|
|
|
|
|
|
|
|
export default class Config extends publicConfig implements CreateComponentType
|
|
|
|
{
|
|
|
|
public key = TextCommonConfig.key
|
|
|
|
public chartConfig = cloneDeep(TextCommonConfig)
|
|
|
|
public option = cloneDeep(option)
|
|
|
|
}
|