chore: add uuid dependency
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { customElement, noShadowDOM } from "solid-element";
|
||||
import { Show, onCleanup } from "solid-js";
|
||||
import { resolvePath } from "../utils/path";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { createDeckStore } from "./hooks/deckStore";
|
||||
import { registerDeck, unregisterDeck } from "./hooks/deck-registry";
|
||||
import type { CardShape } from "./types";
|
||||
@@ -66,7 +67,7 @@ customElement<DeckProps>(
|
||||
const store = createDeckStore(resolvedSrc);
|
||||
|
||||
// 生成唯一 ID 并注册到全局注册表
|
||||
const deckId = `deck-${crypto.randomUUID()}`;
|
||||
const deckId = `deck-${uuidv4()}`;
|
||||
registerDeck(deckId, store, resolvedSrc, csvPath);
|
||||
|
||||
// 解析 size 属性(支持旧格式 "54x86" 和新格式)
|
||||
|
||||
Reference in New Issue
Block a user