config.ts 935 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
  2. /** 广告魔方属性 */
  3. export interface MagicCubeProperty {
  4. // 上圆角
  5. borderRadiusTop: number
  6. // 下圆角
  7. borderRadiusBottom: number
  8. // 间隔
  9. space: number
  10. // 导航菜单列表
  11. list: MagicCubeItemProperty[]
  12. // 组件样式
  13. style: ComponentStyle
  14. }
  15. /** 广告魔方项目属性 */
  16. export interface MagicCubeItemProperty {
  17. // 图标链接
  18. imgUrl: string
  19. // 链接
  20. url: string
  21. // 宽
  22. width: number
  23. // 高
  24. height: number
  25. // 上
  26. top: number
  27. // 左
  28. left: number
  29. }
  30. // 定义组件
  31. export const component = {
  32. id: 'MagicCube',
  33. name: '广告魔方',
  34. icon: 'bi:columns',
  35. property: {
  36. borderRadiusTop: 0,
  37. borderRadiusBottom: 0,
  38. space: 0,
  39. list: [],
  40. style: {
  41. bgType: 'color',
  42. bgColor: '#fff',
  43. marginBottom: 8
  44. } as ComponentStyle
  45. }
  46. } as DiyComponent<MagicCubeProperty>