basicComponentsConfig.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. 'marquee',
  15. 'texts',
  16. 'linkChart',
  17. 'horizontalLine', // 横线
  18. 'verticalLine', // 竖线
  19. 'picture',
  20. 'timeCountDown',
  21. 'currentTime',
  22. 'iframeChart',
  23. 'digitalFlop',
  24. 'tables',
  25. 'screenScrollRanking',
  26. 'screenScrollBoard',
  27. 'video',
  28. 'input',
  29. 'button'
  30. ]
  31. let basicConfigList = []
  32. basicConfigList = typeList.map((type) => {
  33. return getComponentConfig(type)
  34. })
  35. basicConfigList = basicConfigList.map((item) => {
  36. return basicComponentsConfig(item)
  37. })
  38. // 生成基本配置
  39. export function basicComponentsConfig (item) {
  40. return {
  41. ...item,
  42. option: cloneDeep(setModules[item.type]),
  43. ...cloneDeep(dataModules[item.type])
  44. }
  45. }
  46. export default basicConfigList