fix: 修复无法无法使用echarts实例

This commit is contained in:
shaohuzhang1 2024-09-26 10:46:07 +08:00 committed by shaohuzhang1
parent 9d670c44d4
commit 95584496fc

View File

@ -4,6 +4,7 @@
<script lang="ts" setup>
import { onMounted, nextTick, watch, onBeforeUnmount, ref } from 'vue'
import * as echarts from 'echarts'
const tmp = ref()
const props = defineProps({
option: {
type: String,
@ -44,6 +45,8 @@ function jsonParseOption(option: any) {
}
function evalParseOption(option_json: any) {
let option = {}
echarts
tmp.value = echarts
eval(option_json.option)
return option
}