Skip to content

Commit 29367db

Browse files
committed
fix: [Application] The dialogue generates multiple charts for echarts, and after refreshing, all charts are overwritten by the first chart
1 parent e8f9e5a commit 29367db

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

β€Žui/src/components/markdown/EchartsRander.vueβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<script lang="ts" setup>
1414
import { onMounted, onBeforeUnmount, nextTick, watch, ref } from 'vue'
1515
import * as echarts from 'echarts'
16-
16+
import { randomId } from '@/utils/common'
1717
// ── props ──────────────────────────────────────────────────────────────────
1818
const props = defineProps<{ option: string }>()
1919
@@ -59,7 +59,7 @@ const EVAL_TIMEOUT_MS = 5000
5959
6060
const evalInSandbox = (option_json: any): Promise<{ option: any; style: any }> => {
6161
return new Promise((resolve, reject) => {
62-
const id = ++evalSeq
62+
const id = randomId()
6363
let settled = false
6464
6565
const timer = setTimeout(() => {

0 commit comments

Comments
Β (0)