basicComponentsConfig.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * @description: 基础的bigScreen展示组件
  3. * @Date: 2023-03-13 10:04:59
  4. * @Author: xing.heng
  5. * @LastEditors: wujian
  6. * @LastEditTime: 2023-06-01 15:55:48
  7. */
  8. // import _ from 'lodash'
  9. import cloneDeep from 'lodash/cloneDeep'
  10. import getComponentConfig from 'data-room-ui/js/utils/getComponentConfig'
  11. // 批量引入配置文件
  12. import { setModules, dataModules } from 'data-room-ui/js/utils/configImport'
  13. const typeList = [
  14. 'texts',
  15. 'linkChart',
  16. 'horizontalLine', // 横线
  17. 'verticalLine', // 竖线
  18. 'picture',
  19. 'timeCountDown',
  20. 'currentTime',
  21. 'iframeChart',
  22. 'digitalFlop',
  23. 'tables',
  24. 'screenScrollRanking',
  25. 'screenScrollBoard',
  26. 'video',
  27. 'input',
  28. 'button',
  29. 'marquee',
  30. 'button',
  31. 'themeSwitcher'
  32. ]
  33. let basicConfigList = []
  34. basicConfigList = typeList.map((type) => {
  35. return getComponentConfig(type)
  36. })
  37. basicConfigList = basicConfigList.map((item) => {
  38. return basicComponentsConfig(item)
  39. })
  40. // 生成基本配置
  41. export function basicComponentsConfig (item) {
  42. return {
  43. ...item,
  44. option: cloneDeep(setModules[item.type]),
  45. ...cloneDeep(dataModules[item.type])
  46. }
  47. }
  48. export default basicConfigList