Indexeddb: The specified index was not found. 问题解决的记录
indexeddb enprepselfset.html:386 Uncaught (in promise) DOMException: Failed to execute 'index' on 'IDBObjectStore': The specified index was not found.
想用索引查询数据, 一直报这个错, 今天慢慢从头捋清楚, 最终发现是开始建数据库时并没有建索引,虽然没有建立索引可以输入数据,也可以看到输入的数据(用获得所有数据的方法),也可以看到索引,就以为索引就存在了,实际它是查不到的.
结论就是如果开始没有建立索引,就会报上面的错.

浙公网安备 33010602011771号