首页 > 解决方案 > 索引数据库在歌剧、野生动物园中不起作用

问题描述

 if (!("indexedDB" in window)) {
            console.warn("IndexedDB not supported");
            return;
        }
        log("db created ",data.product_detail)
    
        const dbName = "gt_form";
        const storeName = "product_store";
        const version = 1; //versions start at 1
    
            const db = await openDB(dbName, version, {
            upgrade(db, oldVersion, newVersion, transaction) {
            const store = db.createObjectStore(storeName);
            }
        });
        
        const tx = await db.transaction(storeName, "readwrite");
        const store = await tx.objectStore(storeName);
    

它在 mozila 和 chrome 上运行良好,但不知道为什么浏览器的其余部分也不支持 ven chrome 隐身模式

标签: javascriptreactjs

解决方案


推荐阅读