Commit ae95efd5e280c309dfc7ddeaeae416ff8e1c96cf

Authored by fengwotao
1 parent 74e271e1

perf(src/packages): 信息里更多新增自定义echarts组件

1 1 <template>
2   - <collapse-item name="数据源" :expanded="true">
  2 + <collapse-item name="数据源(option配置里的内容)" :expanded="true">
3 3 <monaco-editor v-model:modelValue="optionData.dataset" width="400px" height="480px" language="json" />
4 4 </collapse-item>
5 5 </template>
... ...
... ... @@ -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 {
... ...