You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
1010 B
JavaScript
25 lines
1010 B
JavaScript
// import _ from 'lodash'
|
|
import cloneDeep from 'lodash/cloneDeep'
|
|
import getComponentConfig from 'data-room-ui/js/utils/getDecorationComponentsConfig'
|
|
// 批量引入配置文件
|
|
import { setModules, dataModules } from 'data-room-ui/js/utils/configImport'
|
|
const typeLIst = ['decoration1', 'decoration3', 'decoration2', 'decoration2Reverse', 'decoration4', 'decoration4Reverse', 'decoration5', 'decoration6', 'decoration8', 'decoration8Reverse', 'decoration9', 'decoration10', 'decoration11']
|
|
let basicConfigList = []
|
|
basicConfigList = typeLIst.map(type => {
|
|
// 装饰组件的className保持一致
|
|
return getComponentConfig(type, 'ScreenDecoration')
|
|
})
|
|
basicConfigList = basicConfigList.map(item => {
|
|
return basicComponentsConfig(item)
|
|
})
|
|
// 生成基本配置
|
|
export function basicComponentsConfig (item) {
|
|
// let type = `lcdp${upperFirst(item.type)}`
|
|
return {
|
|
...item,
|
|
option: cloneDeep(setModules[item.type]),
|
|
...cloneDeep(dataModules[item.type])
|
|
}
|
|
}
|
|
export default basicConfigList
|