61 lines
1.3 KiB
TypeScript
61 lines
1.3 KiB
TypeScript
|
|
import type { MetaContainerItem } from 'open-data-v/base'
|
||
|
|
import { ComponentGroup, CustomComponent, FormType } from 'open-data-v/base'
|
||
|
|
|
||
|
|
export const componentName = 'Decoration3'
|
||
|
|
class DecorationComponent extends CustomComponent {
|
||
|
|
constructor(id?: string, name?: string) {
|
||
|
|
super({
|
||
|
|
component: componentName,
|
||
|
|
group: ComponentGroup.DECORATION,
|
||
|
|
name: name ? name : '3#装饰',
|
||
|
|
id,
|
||
|
|
width: 200,
|
||
|
|
height: 60
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
_prop: MetaContainerItem[] = [
|
||
|
|
{
|
||
|
|
label: '基础配置',
|
||
|
|
prop: 'base',
|
||
|
|
children: [
|
||
|
|
{
|
||
|
|
prop: 'color1',
|
||
|
|
label: '颜色1',
|
||
|
|
type: FormType.COLOR,
|
||
|
|
props: {
|
||
|
|
defaultValue: '#7acaec'
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
prop: 'color2',
|
||
|
|
label: '颜色2',
|
||
|
|
type: FormType.COLOR,
|
||
|
|
props: {
|
||
|
|
defaultValue: '#7acaec'
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
prop: 'rectWidth',
|
||
|
|
label: '单个矩形宽度',
|
||
|
|
type: FormType.NUMBER,
|
||
|
|
props: {
|
||
|
|
defaultValue: 7
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
prop: 'space',
|
||
|
|
label: '矩形间距',
|
||
|
|
type: FormType.NUMBER,
|
||
|
|
props: {
|
||
|
|
defaultValue: 1
|
||
|
|
}
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
]
|
||
|
|
_style: MetaContainerItem[] = []
|
||
|
|
}
|
||
|
|
|
||
|
|
export default DecorationComponent
|