config.ts
1.11 KB
import cloneDeep from 'lodash/cloneDeep'
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 { PageButtonConfig } from './index'
export const option = {
// 时间组件展示类型,必须和 interactActions 中定义的数据一致
[COMPONENT_INTERACT_EVENT_KET]: ComponentInteractEventEnum.DATA,
// 暴露配置内容给用户
dataset: '第1页',
buttonType: 'primary',
buttonGhost: false,
buttonDashed: false,
buttonColor: '',
buttonTextColor: 'white',
buttonTextSize: '16',
buttonTextBold: 500,
selectTargetItems: []
}
export default class Config extends PublicConfigClass implements CreateComponentType {
public key = PageButtonConfig.key
public attr = { ...chartInitConfig, w: 90, h: 40, zIndex: -1 }
public chartConfig = cloneDeep(PageButtonConfig)
public interactActions = interactActions
public option = cloneDeep(option)
}