1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
| /*
| * @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.sxlinks.modules.system.components.visual.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
|
|