zmdms-webui 1.4.1 → 1.4.2
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.
|
@@ -174,22 +174,22 @@ function useColumns(columns, options) {
|
|
|
174
174
|
*/
|
|
175
175
|
var insertTableFromClipboard = function (e, options) { return __awaiter(_this, void 0, void 0, function () {
|
|
176
176
|
var dataIndex, index, _a, isUpdate, _b, verticalTextList, text, isContinue_1, newDataSource_1, columns_1, column, filterDataSource, _c, pasteConfig, newDataSource, oldDataSource, err_1;
|
|
177
|
-
var _d, _e, _f, _g, _h;
|
|
178
|
-
return __generator(this, function (
|
|
179
|
-
switch (
|
|
177
|
+
var _d, _e, _f, _g, _h, _j;
|
|
178
|
+
return __generator(this, function (_k) {
|
|
179
|
+
switch (_k.label) {
|
|
180
180
|
case 0:
|
|
181
181
|
dataIndex = _key;
|
|
182
182
|
index = options.index, _a = options.isUpdate, isUpdate = _a === void 0 ? true : _a;
|
|
183
|
-
|
|
183
|
+
_k.label = 1;
|
|
184
184
|
case 1:
|
|
185
|
-
|
|
185
|
+
_k.trys.push([1, 5, , 6]);
|
|
186
186
|
return [4 /*yield*/, parsePasteData(e, {
|
|
187
187
|
maxRow: ((_d = currentPage === null || currentPage === void 0 ? void 0 : currentPage.current) === null || _d === void 0 ? void 0 : _d.pageSize)
|
|
188
188
|
? ((_e = currentPage === null || currentPage === void 0 ? void 0 : currentPage.current) === null || _e === void 0 ? void 0 : _e.pageSize) - index
|
|
189
189
|
: ((_f = dataSourceRef.current) === null || _f === void 0 ? void 0 : _f.length) - index,
|
|
190
190
|
})];
|
|
191
191
|
case 2:
|
|
192
|
-
_b =
|
|
192
|
+
_b = _k.sent(), verticalTextList = _b.verticalTextList, text = _b.text;
|
|
193
193
|
if (!(verticalTextList.length > 0)) return [3 /*break*/, 4];
|
|
194
194
|
isContinue_1 = true;
|
|
195
195
|
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
@@ -208,9 +208,9 @@ function useColumns(columns, options) {
|
|
|
208
208
|
});
|
|
209
209
|
})];
|
|
210
210
|
case 3:
|
|
211
|
-
|
|
211
|
+
_k.sent();
|
|
212
212
|
if (!isContinue_1) {
|
|
213
|
-
newDataSource_1 = ((_h = (_g = dataSourceRef.current) === null || _g === void 0 ? void 0 : _g.slice) === null || _h === void 0 ? void 0 : _h.call(_g)) ||
|
|
213
|
+
newDataSource_1 = (_j = (_h = (_g = dataSourceRef.current) === null || _g === void 0 ? void 0 : _g.slice) === null || _h === void 0 ? void 0 : _h.call(_g)) === null || _j === void 0 ? void 0 : _j.map(function (item) { return (__assign({}, item)); });
|
|
214
214
|
if (newDataSource_1 && newDataSource_1[index]) {
|
|
215
215
|
newDataSource_1[index][dataIndex] = text;
|
|
216
216
|
}
|
|
@@ -255,7 +255,7 @@ function useColumns(columns, options) {
|
|
|
255
255
|
pasteConfig: {},
|
|
256
256
|
}];
|
|
257
257
|
case 5:
|
|
258
|
-
err_1 =
|
|
258
|
+
err_1 = _k.sent();
|
|
259
259
|
console.log("粘贴事件内部错误", err_1);
|
|
260
260
|
return [2 /*return*/, {
|
|
261
261
|
newDataSource: dataSourceRef.current,
|
|
@@ -27,7 +27,7 @@ function isFilterData(filterConfigRef) {
|
|
|
27
27
|
}
|
|
28
28
|
// 获取内部当前索引位置
|
|
29
29
|
function getInnerIndex(currentPage, index, options) {
|
|
30
|
-
var filterConfigRef =
|
|
30
|
+
var _a = options || {}, filterConfigRef = _a.filterConfigRef, rowKey = _a.rowKey, record = _a.record, dataSourceRef = _a.dataSourceRef;
|
|
31
31
|
if (isFilterData(filterConfigRef) && record && rowKey) {
|
|
32
32
|
try {
|
|
33
33
|
var parseRowKey_1 = typeof rowKey === "string" ? rowKey : rowKey(record);
|