@vipl520/dk-ui 1.0.24 → 1.0.26
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +14 -4
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +3 -3
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +14 -4
- package/dist/web-types.json +1 -1
- package/es/table/utils/dkTable.mjs +14 -3
- package/es/table/utils/dkTable.mjs.map +1 -1
- package/lib/table/utils/dkTable.js +14 -3
- package/lib/table/utils/dkTable.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -366,7 +366,6 @@
|
|
366
366
|
return config2;
|
367
367
|
},
|
368
368
|
(error) => {
|
369
|
-
console.log("error", error);
|
370
369
|
return Promise.reject(error);
|
371
370
|
}
|
372
371
|
);
|
@@ -28113,6 +28112,7 @@
|
|
28113
28112
|
this.runAfter("getIndex", { res });
|
28114
28113
|
}).finally(() => {
|
28115
28114
|
this.table.loading = false;
|
28115
|
+
}).catch(() => {
|
28116
28116
|
});
|
28117
28117
|
};
|
28118
28118
|
getTable = (cache = false) => {
|
@@ -28120,7 +28120,7 @@
|
|
28120
28120
|
return;
|
28121
28121
|
this.table.columnLoading = true;
|
28122
28122
|
if (cache) {
|
28123
|
-
const cachedData = storage.get(this.
|
28123
|
+
const cachedData = storage.get(this.api.actionUrl.get("table") + "_table");
|
28124
28124
|
if (cachedData) {
|
28125
28125
|
const cachedTableData = JSON.parse(cachedData);
|
28126
28126
|
this.table.column = cachedTableData.column;
|
@@ -28134,10 +28134,11 @@
|
|
28134
28134
|
if (res.data.pk) {
|
28135
28135
|
this.table.pk = res.data.pk;
|
28136
28136
|
}
|
28137
|
-
storage.set(this.
|
28137
|
+
storage.set(this.api.actionUrl.get("table") + "_table", JSON.stringify(res.data));
|
28138
28138
|
this.runAfter("getTable", { res });
|
28139
28139
|
}).finally(() => {
|
28140
28140
|
this.table.columnLoading = false;
|
28141
|
+
}).catch(() => {
|
28141
28142
|
});
|
28142
28143
|
}
|
28143
28144
|
};
|
@@ -28351,7 +28352,16 @@
|
|
28351
28352
|
const line = [];
|
28352
28353
|
headerLabels.forEach((label) => {
|
28353
28354
|
const prop = headerMap.get(label);
|
28354
|
-
|
28355
|
+
let value = "";
|
28356
|
+
if (prop && prop.indexOf(".") > -1) {
|
28357
|
+
const fieldNameArr = prop.split(".");
|
28358
|
+
value = row[fieldNameArr[0]] || {};
|
28359
|
+
for (let index = 1; index < fieldNameArr.length; index++) {
|
28360
|
+
value = value ? value[fieldNameArr[index]] ?? "" : "";
|
28361
|
+
}
|
28362
|
+
} else {
|
28363
|
+
value = String(row[prop]);
|
28364
|
+
}
|
28355
28365
|
line.push(`"${value.replace(/"/g, '""').replace(/[\n\r]/g, " ")}"`);
|
28356
28366
|
});
|
28357
28367
|
csvContent += line.join(",") + "\n";
|