king
2021-06-02 e543372cc70a19ff2630c79d8421c2c593e54e5f
src/api/cacheutils.js
@@ -306,6 +306,31 @@
  }
  /**
   * @description 删除IndexedDB中保存的配置信息-批量
   */
  static delIndexDBConfig (keys) {
    if (!window.GLOB.IndexDB || !keys) return
    let objectStore = window.GLOB.IndexDB.transaction(['configs'], 'readwrite').objectStore('configs')
    objectStore.openCursor().onsuccess = (event) => {
      let cursor = event.target.result
      if (cursor) {
        if (cursor.value && keys.includes(cursor.value.menuid)) {
          let request = objectStore.delete(cursor.key)
          request.onerror = () => {
            window.GLOB.IndexDB = null
          }
        }
        cursor.continue()
      }
    }
  }
  /**
   * @description 获取IndexedDB中的配置信息
   */
  static getIndexDBMenuConfig (MenuID, userid) {