Commit ae95efd5e280c309dfc7ddeaeae416ff8e1c96cf
1 parent
74e271e1
perf(src/packages): 信息里更多新增自定义echarts组件
Showing
2 changed files
with
6 additions
and
2 deletions
| ... | ... | @@ -74,9 +74,13 @@ watch( |
| 74 | 74 | () => props.chartConfig.option.dataset, |
| 75 | 75 | newValue => { |
| 76 | 76 | try { |
| 77 | + //嵌套字符串使用JSON.parse会报错,这里使用eval函数 | |
| 77 | 78 | updateVChart(eval('(' + newValue + ')')) |
| 78 | 79 | } catch (e) { |
| 79 | - console.log(e) | |
| 80 | + console.error( | |
| 81 | + `文件位置:src\\packages\\components\\external\\InformationsMores\\CustomEcharts\\index.vue`, | |
| 82 | + '错误信息:您的json格式有误' | |
| 83 | + ) | |
| 80 | 84 | } |
| 81 | 85 | }, |
| 82 | 86 | { | ... | ... |