ソースを参照

1、修复crypto.randomUUID()丢失导致无法复制配置值问题

MY 4 週間 前
コミット
fdfd89dda3
1 ファイル変更2 行追加1 行削除
  1. 2 1
      JLHWEB/src/stores/modules/copy.ts

+ 2 - 1
JLHWEB/src/stores/modules/copy.ts

@@ -1,5 +1,6 @@
 import { defineStore } from "pinia";
 import piniaPersistConfig from "@/config/piniaPersist";
+import { generateUUID } from "@/utils";
 
 type ClipboardItem<T = any> = {
   key?: string;
@@ -26,7 +27,7 @@ export const useClipboardStore = defineStore("clipboard", {
         id?: string;
       } = {}
     ) {
-      const { key = "default", id = crypto.randomUUID() } = options;
+      const { key = "default", id = generateUUID() } = options;
 
       // 自动清理旧记录
       if (this.items.length >= this.maxHistory) {