1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
| import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
|
| /** 秒杀属性 */
| export interface PromotionSeckillProperty {
| // 布局类型:单列 | 三列
| layoutType: 'oneCol' | 'threeCol'
| // 商品字段
| fields: {
| // 商品名称
| name: PromotionSeckillFieldProperty
| // 商品价格
| price: PromotionSeckillFieldProperty
| }
| // 角标
| badge: {
| // 是否显示
| show: boolean
| // 角标图片
| imgUrl: string
| }
| // 上圆角
| borderRadiusTop: number
| // 下圆角
| borderRadiusBottom: number
| // 间距
| space: number
| // 秒杀活动编号
| activityId: number
| // 组件样式
| style: ComponentStyle
| }
| // 商品字段
| export interface PromotionSeckillFieldProperty {
| // 是否显示
| show: boolean
| // 颜色
| color: string
| }
|
| // 定义组件
| export const component = {
| id: 'PromotionSeckill',
| name: '秒杀',
| icon: 'mdi:calendar-time',
| property: {
| activityId: undefined,
| layoutType: 'oneCol',
| fields: {
| name: { show: true, color: '#000' },
| price: { show: true, color: '#ff3000' }
| },
| badge: { show: false, imgUrl: '' },
| borderRadiusTop: 8,
| borderRadiusBottom: 8,
| space: 8,
| style: {
| bgType: 'color',
| bgColor: '',
| marginLeft: 8,
| marginRight: 8,
| marginBottom: 8
| } as ComponentStyle
| }
| } as DiyComponent<PromotionSeckillProperty>
|
|