瀏覽代碼

fix: 删除多余的eval代码

hong.yang 1 年之前
父節點
當前提交
ede1a1b418
共有 1 個文件被更改,包括 0 次插入9 次删除
  1. 0 9
      data-room-ui/packages/PlotRender/index.vue

+ 0 - 9
data-room-ui/packages/PlotRender/index.vue

@@ -196,15 +196,6 @@ export default {
           const xAxis = config.setting.find(item => item.field === 'xField')?.value
           const yAxis = config.setting.find(item => item.field === 'yField')?.value
           config.option.data = data?.map(item => {
-            // 此处函数处理data
-            if (config.dataHandler) {
-              try {
-                // 此处函数处理data
-                eval(config.dataHandler)
-              } catch (e) {
-                console.error(e)
-              }
-            }
             if (config.chartType !== 'Bar' && xAxis && typeof item[xAxis] === 'number') {
               item[xAxis] = (item[xAxis]).toString()
             } else if (config.chartType === 'Bar' && yAxis && typeof item[yAxis] === 'number') {