config.ts 882 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
  2. /** 产品卡片属性 */
  3. export interface CouponCardProperty {
  4. // 列数
  5. columns: number
  6. // 背景图
  7. bgImg: string
  8. // 文字颜色
  9. textColor: string
  10. // 按钮样式
  11. button: {
  12. // 颜色
  13. color: string
  14. // 背景颜色
  15. bgColor: string
  16. }
  17. // 间距
  18. space: number
  19. // 优惠券编号列表
  20. couponIds: number[]
  21. // 组件样式
  22. style: ComponentStyle
  23. }
  24. // 定义组件
  25. export const component = {
  26. id: 'CouponCard',
  27. name: '优惠券',
  28. icon: 'ep:ticket',
  29. property: {
  30. columns: 1,
  31. bgImg: '',
  32. textColor: '#E9B461',
  33. button: {
  34. color: '#434343',
  35. bgColor: ''
  36. },
  37. space: 0,
  38. couponIds: [],
  39. style: {
  40. bgType: 'color',
  41. bgColor: '',
  42. marginBottom: 8
  43. } as ComponentStyle
  44. }
  45. } as DiyComponent<CouponCardProperty>