basicComponentsConfig.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 getComponentConfig from 'packages/js/utils/getComponentConfig'
  10. // 批量引入配置文件
  11. import { setModules, dataModules } from 'packages/js/utils/configImport'
  12. const typeList = [
  13. 'texts',
  14. 'linkChart',
  15. 'horizontalLine', // 横线
  16. 'verticalLine', // 竖线
  17. 'picture',
  18. 'timeCountDown',
  19. 'currentTime',
  20. 'iframeChart',
  21. 'digitalFlop',
  22. 'tables',
  23. 'screenScrollRanking',
  24. 'screenScrollBoard',
  25. 'video',
  26. 'input',
  27. 'button'
  28. ]
  29. let basicConfigList = []
  30. basicConfigList = typeList.map((type) => {
  31. return getComponentConfig(type)
  32. })
  33. basicConfigList = basicConfigList.map((item) => {
  34. return basicComponentsConfig(item)
  35. })
  36. // 生成基本配置
  37. export function basicComponentsConfig (item) {
  38. return {
  39. ...item,
  40. option: _.cloneDeep(setModules[item.type]),
  41. ..._.cloneDeep(dataModules[item.type])
  42. }
  43. }
  44. export default basicConfigList