fix: 修复无法无法使用echarts实例
This commit is contained in:
parent
9d670c44d4
commit
95584496fc
@ -4,6 +4,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, nextTick, watch, onBeforeUnmount, ref } from 'vue'
|
import { onMounted, nextTick, watch, onBeforeUnmount, ref } from 'vue'
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
|
const tmp = ref()
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
option: {
|
option: {
|
||||||
type: String,
|
type: String,
|
||||||
@ -44,6 +45,8 @@ function jsonParseOption(option: any) {
|
|||||||
}
|
}
|
||||||
function evalParseOption(option_json: any) {
|
function evalParseOption(option_json: any) {
|
||||||
let option = {}
|
let option = {}
|
||||||
|
echarts
|
||||||
|
tmp.value = echarts
|
||||||
eval(option_json.option)
|
eval(option_json.option)
|
||||||
return option
|
return option
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user