chore: fix warnings and errors in demo (#839)

* chore: suppress warning in demo

* chore: prevent multiple intializations of esbuild-wasm in demo HMR
This commit is contained in:
Yue JIN
2025-06-24 13:43:02 +08:00
committed by Justineo
parent fa42af0723
commit 6155bbb409
3 changed files with 8 additions and 5 deletions

View File

@ -78,7 +78,11 @@ const transformedCode = ref("");
const transformErrors = ref([]); const transformErrors = ref([]);
onMounted(async () => { onMounted(async () => {
await initialize({ wasmURL }); // prevent multiple initializations during HMR
if (!window.__esbuildInitialized) {
await initialize({ wasmURL });
window.__esbuildInitialized = true;
}
initializing.value = false; initializing.value = false;

View File

@ -20,10 +20,8 @@ export default {
}, },
shape: `path://${d}`, shape: `path://${d}`,
label: { label: {
normal: { formatter() {
formatter() { return "";
return "";
},
}, },
}, },
itemStyle: { itemStyle: {

View File

@ -27,6 +27,7 @@ export const useScoreStore = defineStore("store", () => {
fontWeight: 300, fontWeight: 300,
}, },
radar: { radar: {
splitNumber: 4,
indicator: scores.value.map(({ name, max }, index) => { indicator: scores.value.map(({ name, max }, index) => {
if (index === activeIndex) { if (index === activeIndex) {
return { name, max, color: "goldenrod" }; return { name, max, color: "goldenrod" };