config.ts 813 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util'
  2. /** 热区属性 */
  3. export interface HotZoneProperty {
  4. // 图片地址
  5. imgUrl: string
  6. // 导航菜单列表
  7. list: HotZoneItemProperty[]
  8. // 组件样式
  9. style: ComponentStyle
  10. }
  11. /** 热区项目属性 */
  12. export interface HotZoneItemProperty {
  13. // 链接的名称
  14. name: string
  15. // 链接
  16. url: string
  17. // 宽
  18. width: number
  19. // 高
  20. height: number
  21. // 上
  22. top: number
  23. // 左
  24. left: number
  25. }
  26. // 定义组件
  27. export const component = {
  28. id: 'HotZone',
  29. name: '热区',
  30. icon: 'tabler:hand-click',
  31. property: {
  32. imgUrl: '',
  33. list: [] as HotZoneItemProperty[],
  34. style: {
  35. bgType: 'color',
  36. bgColor: '#fff',
  37. marginBottom: 8
  38. } as ComponentStyle
  39. }
  40. } as DiyComponent<HotZoneProperty>