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([]);
onMounted(async () => {
// prevent multiple initializations during HMR
if (!window.__esbuildInitialized) {
await initialize({ wasmURL });
window.__esbuildInitialized = true;
}
initializing.value = false;

View File

@ -20,12 +20,10 @@ export default {
},
shape: `path://${d}`,
label: {
normal: {
formatter() {
return "";
},
},
},
itemStyle: {
shadowBlur: 12,
shadowColor: "rgba(0, 0, 0, 0.25)",

View File

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