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.

40 lines
1.0 KiB
JavaScript

/*
* @description: webpack读取当前文件夹下的所有 图表的js文件配置, 生成g2Plot配置列表
* @Date: 2023-03-28 10:40:22
* @Author: xing.heng
*/
import { dataConfig, settingConfig } from './settingConfig'
// import _ from 'lodash'
import cloneDeep from 'lodash/cloneDeep'
import icon from './export'
const iconList = icon.getIconList()
const svgList = getSvgList(iconList)
// 获取svg配置
function getSvgList (iconList) {
const svgList = []
iconList.forEach((svg, index) => {
svgList[index] = {
title: svg + '图标',
name: svg,
icon: svg,
className: 'com.gccloud.dataroom.core.module.chart.components.ScreenSvgsChart',
w: 100,
h: 100,
x: 0,
y: 0,
type: 'svgs',
chartType: 'svg',
option: {
...cloneDeep(settingConfig)
},
setting: {}, // 右侧面板自定义配置
dataHandler: {}, // 数据自定义处理js脚本
...cloneDeep(dataConfig)
}
})
return svgList
}
export default svgList