vue2-client 1.15.12 → 1.15.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
title="示例表单"
|
5
5
|
:queryParamsName="queryParamsName"
|
6
6
|
:fixedAddForm="fixedAddForm"
|
7
|
+
service-name="af-revenue"
|
7
8
|
:externalSelectedRowKeys="selectedKeys"
|
8
9
|
@action="action"
|
9
10
|
@selectRow="selectRow"
|
@@ -25,7 +26,7 @@ export default {
|
|
25
26
|
data () {
|
26
27
|
return {
|
27
28
|
// 查询配置文件名
|
28
|
-
queryParamsName: '
|
29
|
+
queryParamsName: 'ceshiCRUD',
|
29
30
|
// 新增表单固定值
|
30
31
|
fixedAddForm: {},
|
31
32
|
// 是否显示详情抽屉
|
package/src/utils/indexedDB.js
CHANGED
@@ -246,9 +246,20 @@ export class IndexedDBManager {
|
|
246
246
|
// 再检查IndexedDB缓存
|
247
247
|
const data = DB_CONFIG.NAME === LIULI_WEB_DB_NAME ? undefined : await this.getData(key)
|
248
248
|
|
249
|
+
if (data && data.ERROR) {
|
250
|
+
console.error(`获取配置失败:` + data.ERROR)
|
251
|
+
}
|
252
|
+
|
249
253
|
if (!data && url) {
|
250
254
|
// 缓存未命中,请求网络数据
|
251
|
-
|
255
|
+
let res
|
256
|
+
try {
|
257
|
+
res = await post(url, params)
|
258
|
+
} catch (e) {
|
259
|
+
res = {
|
260
|
+
ERROR: e
|
261
|
+
}
|
262
|
+
}
|
252
263
|
const processedData = processFun ? processFun(res) : res
|
253
264
|
|
254
265
|
// 同时保存到内存缓存
|
@@ -270,7 +281,7 @@ export class IndexedDBManager {
|
|
270
281
|
callback(data)
|
271
282
|
}
|
272
283
|
} catch (error) {
|
273
|
-
console.error(`[getByWeb]
|
284
|
+
console.error(`[getByWeb] 获取数据失败`, error)
|
274
285
|
|
275
286
|
// IndexedDB操作失败时切换到备用方案
|
276
287
|
if (error.name === 'InvalidStateError' || error.message?.includes('database') || error.message?.includes('transaction')) {
|