zmdms-webui 1.6.8 → 1.6.9

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.
@@ -59,6 +59,31 @@ interface IUploadListProps extends Omit<UploadProps, "onChange"> {
59
59
  tableColumns?: (IColumnsTypeProp<any> | string)[];
60
60
  /** 选择文件前的校验 */
61
61
  onBeforeSelectFileValidate?: () => Promise<boolean>;
62
+ /**
63
+ * 下载前的校验(是否可以下载)
64
+ */
65
+ onBeforeDownloadValidate?: (files: IFileItem[]) => Promise<boolean>;
66
+ /**
67
+ * 删除前的校验(是否可以删除)
68
+ */
69
+ onBeforeDeleteValidate?: (files: IFileItem[]) => Promise<boolean>;
70
+ /**
71
+ * 预览前的校验(是否可以预览)
72
+ */
73
+ onBeforePreviewValidate?: (files: IFileItem[]) => Promise<boolean>;
74
+ }
75
+ interface IFileItem {
76
+ /** 附件id */
77
+ attachId: string;
78
+ /** 附件名称 */
79
+ attachName: string;
80
+ /** 附件大小 */
81
+ attachSize: number;
82
+ /** 上传人 */
83
+ uploadUser: string;
84
+ /** 上传时间 */
85
+ uploadTime: string;
86
+ [prop: string]: any;
62
87
  }
63
88
  interface IUploadFieldNames {
64
89
  attachId?: string;
@@ -30,7 +30,7 @@ var MAXSIZE = 104857600; // 100 * 1024 * 1024
30
30
  */
31
31
  var UploadList = function (props, ref) {
32
32
  var _a;
33
- var children = props.children, btnText = props.btnText, className = props.className, _b = props.showTip, showTip = _b === void 0 ? true : _b, _c = props.maxSize, maxSize = _c === void 0 ? MAXSIZE : _c, showTable = props.showTable, acceptList = props.acceptList, beforeUpload = props.beforeUpload, onChange = props.onChange, PROPS_API_BASEURL = props.API_BASEURL, PROPS_FILE_API_BASEURL = props.FILE_API_BASEURL, action = props.action, headers = props.headers, data = props.data, userName = props.userName, fileList = props.fileList, isPublic = props.isPublic, _d = props.maxPreviewSize, maxPreviewSize = _d === void 0 ? MAX_PREVIEW_SIZE : _d, isPreview = props.isPreview, isDownload = props.isDownload, isDelete = props.isDelete, _e = props.zipName, zipName = _e === void 0 ? "\u6279\u91CF\u4E0B\u8F7D-".concat(Date.now(), ".zip") : _e, isImage = props.isImage, imgCropProps = props.imgCropProps, _f = props.imgWidth, imgWidth = _f === void 0 ? 110 : _f, _g = props.imgHeight, imgHeight = _g === void 0 ? 110 : _g, customRenderBtn = props.customRenderBtn, disAllowDuplicateFile = props.disAllowDuplicateFile, fieldNames = props.fieldNames, tableColumns = props.tableColumns, resetProps = __rest(props, ["children", "btnText", "className", "showTip", "maxSize", "showTable", "acceptList", "beforeUpload", "onChange", "API_BASEURL", "FILE_API_BASEURL", "action", "headers", "data", "userName", "fileList", "isPublic", "maxPreviewSize", "isPreview", "isDownload", "isDelete", "zipName", "isImage", "imgCropProps", "imgWidth", "imgHeight", "customRenderBtn", "disAllowDuplicateFile", "fieldNames", "tableColumns"]);
33
+ var children = props.children, btnText = props.btnText, className = props.className, _b = props.showTip, showTip = _b === void 0 ? true : _b, _c = props.maxSize, maxSize = _c === void 0 ? MAXSIZE : _c, showTable = props.showTable, acceptList = props.acceptList, beforeUpload = props.beforeUpload, onChange = props.onChange, PROPS_API_BASEURL = props.API_BASEURL, PROPS_FILE_API_BASEURL = props.FILE_API_BASEURL, action = props.action, headers = props.headers, data = props.data, userName = props.userName, fileList = props.fileList, isPublic = props.isPublic, _d = props.maxPreviewSize, maxPreviewSize = _d === void 0 ? MAX_PREVIEW_SIZE : _d, isPreview = props.isPreview, isDownload = props.isDownload, isDelete = props.isDelete, _e = props.zipName, zipName = _e === void 0 ? "\u6279\u91CF\u4E0B\u8F7D-".concat(Date.now(), ".zip") : _e, isImage = props.isImage, imgCropProps = props.imgCropProps, _f = props.imgWidth, imgWidth = _f === void 0 ? 110 : _f, _g = props.imgHeight, imgHeight = _g === void 0 ? 110 : _g, customRenderBtn = props.customRenderBtn, disAllowDuplicateFile = props.disAllowDuplicateFile, fieldNames = props.fieldNames, tableColumns = props.tableColumns, onBeforeDownloadValidate = props.onBeforeDownloadValidate, onBeforePreviewValidate = props.onBeforePreviewValidate, onBeforeDeleteValidate = props.onBeforeDeleteValidate, resetProps = __rest(props, ["children", "btnText", "className", "showTip", "maxSize", "showTable", "acceptList", "beforeUpload", "onChange", "API_BASEURL", "FILE_API_BASEURL", "action", "headers", "data", "userName", "fileList", "isPublic", "maxPreviewSize", "isPreview", "isDownload", "isDelete", "zipName", "isImage", "imgCropProps", "imgWidth", "imgHeight", "customRenderBtn", "disAllowDuplicateFile", "fieldNames", "tableColumns", "onBeforeDownloadValidate", "onBeforePreviewValidate", "onBeforeDeleteValidate"]);
34
34
  var maxCount = resetProps.maxCount, listType = resetProps.listType, method = resetProps.method;
35
35
  var imgSizeClassName = "temporary-className-".concat(imgWidth, "-").concat(imgHeight);
36
36
  var classes = classNames("ztxk-upload", className, (_a = {},
@@ -99,26 +99,51 @@ var UploadList = function (props, ref) {
99
99
  newFieldNames: newFieldNames,
100
100
  });
101
101
  // 批量删除
102
- var onBatchDeleteHandle = function () {
103
- var _a, _b, _c;
104
- var checked = (_b = (_a = tableRef.current) === null || _a === void 0 ? void 0 : _a.getChecked) === null || _b === void 0 ? void 0 : _b.call(_a);
105
- if (!checked || checked.length === 0) {
106
- message.info("请选择需要操作的数据!");
107
- return;
108
- }
109
- setInnerFileList(function (innerFileList) {
110
- var newInnerFileList = innerFileList.filter(function (item) { return !checked.find(function (c) { return c.uid === item.uid; }); });
111
- return newInnerFileList;
102
+ var onBatchDeleteHandle = function () { return __awaiter(void 0, void 0, void 0, function () {
103
+ var checked, isResult;
104
+ var _a, _b, _c, _d, _e, _f;
105
+ return __generator(this, function (_g) {
106
+ switch (_g.label) {
107
+ case 0:
108
+ checked = (_b = (_a = tableRef.current) === null || _a === void 0 ? void 0 : _a.getChecked) === null || _b === void 0 ? void 0 : _b.call(_a);
109
+ if (!checked || checked.length === 0) {
110
+ message.info("请选择需要操作的数据!");
111
+ return [2 /*return*/];
112
+ }
113
+ if (!onBeforeDeleteValidate) return [3 /*break*/, 4];
114
+ (_c = tableRef.current) === null || _c === void 0 ? void 0 : _c.setLoading(true);
115
+ _g.label = 1;
116
+ case 1:
117
+ _g.trys.push([1, 3, , 4]);
118
+ return [4 /*yield*/, onBeforeDeleteValidate(checked)];
119
+ case 2:
120
+ isResult = _g.sent();
121
+ (_d = tableRef.current) === null || _d === void 0 ? void 0 : _d.setLoading(false);
122
+ if (!isResult) {
123
+ return [2 /*return*/];
124
+ }
125
+ return [3 /*break*/, 4];
126
+ case 3:
127
+ _g.sent();
128
+ (_e = tableRef.current) === null || _e === void 0 ? void 0 : _e.setLoading(false);
129
+ return [2 /*return*/];
130
+ case 4:
131
+ setInnerFileList(function (innerFileList) {
132
+ var newInnerFileList = innerFileList.filter(function (item) { return !checked.find(function (c) { return c.uid === item.uid; }); });
133
+ return newInnerFileList;
134
+ });
135
+ // 清空选中项
136
+ (_f = tableRef.current) === null || _f === void 0 ? void 0 : _f.setChecked([]);
137
+ return [2 /*return*/];
138
+ }
112
139
  });
113
- // 清空选中项
114
- (_c = tableRef.current) === null || _c === void 0 ? void 0 : _c.setChecked([]);
115
- };
140
+ }); };
116
141
  // 批量下载
117
142
  var onBatchDownloadHandle = function (type) { return __awaiter(void 0, void 0, void 0, function () {
118
- var checked;
119
- var _a, _b, _c, _d, _e;
120
- return __generator(this, function (_f) {
121
- switch (_f.label) {
143
+ var checked, isResult;
144
+ var _a, _b, _c, _d, _e, _f, _g;
145
+ return __generator(this, function (_h) {
146
+ switch (_h.label) {
122
147
  case 0:
123
148
  checked = (_b = (_a = tableRef.current) === null || _a === void 0 ? void 0 : _a.getChecked) === null || _b === void 0 ? void 0 : _b.call(_a);
124
149
  if (!checked || checked.length === 0) {
@@ -126,24 +151,41 @@ var UploadList = function (props, ref) {
126
151
  return [2 /*return*/];
127
152
  }
128
153
  (_c = tableRef.current) === null || _c === void 0 ? void 0 : _c.setLoading(true);
129
- if (!(type === "compress")) return [3 /*break*/, 5];
130
- _f.label = 1;
154
+ if (!onBeforeDownloadValidate) return [3 /*break*/, 4];
155
+ _h.label = 1;
131
156
  case 1:
132
- _f.trys.push([1, 3, , 4]);
133
- return [4 /*yield*/, batchDownloadFiles(checked, {
134
- API_BASEURL: API_BASEURL,
135
- zipName: zipName,
136
- })];
157
+ _h.trys.push([1, 3, , 4]);
158
+ return [4 /*yield*/, onBeforeDownloadValidate(checked)];
137
159
  case 2:
138
- _f.sent();
139
- (_d = tableRef.current) === null || _d === void 0 ? void 0 : _d.setLoading(false);
160
+ isResult = _h.sent();
161
+ if (!isResult) {
162
+ (_d = tableRef.current) === null || _d === void 0 ? void 0 : _d.setLoading(false);
163
+ return [2 /*return*/];
164
+ }
140
165
  return [3 /*break*/, 4];
141
166
  case 3:
142
- _f.sent();
167
+ _h.sent();
143
168
  (_e = tableRef.current) === null || _e === void 0 ? void 0 : _e.setLoading(false);
144
- return [3 /*break*/, 4];
145
- case 4: return [3 /*break*/, 6];
169
+ return [2 /*return*/];
170
+ case 4:
171
+ if (!(type === "compress")) return [3 /*break*/, 9];
172
+ _h.label = 5;
146
173
  case 5:
174
+ _h.trys.push([5, 7, , 8]);
175
+ return [4 /*yield*/, batchDownloadFiles(checked, {
176
+ API_BASEURL: API_BASEURL,
177
+ zipName: zipName,
178
+ })];
179
+ case 6:
180
+ _h.sent();
181
+ (_f = tableRef.current) === null || _f === void 0 ? void 0 : _f.setLoading(false);
182
+ return [3 /*break*/, 8];
183
+ case 7:
184
+ _h.sent();
185
+ (_g = tableRef.current) === null || _g === void 0 ? void 0 : _g.setLoading(false);
186
+ return [3 /*break*/, 8];
187
+ case 8: return [3 /*break*/, 10];
188
+ case 9:
147
189
  checked.forEach(function (item) {
148
190
  downloadFile(item === null || item === void 0 ? void 0 : item.attachId, item === null || item === void 0 ? void 0 : item.attachName, {
149
191
  API_BASEURL: API_BASEURL,
@@ -158,8 +200,8 @@ var UploadList = function (props, ref) {
158
200
  (_a = tableRef.current) === null || _a === void 0 ? void 0 : _a.setLoading(false);
159
201
  });
160
202
  });
161
- _f.label = 6;
162
- case 6: return [2 /*return*/];
203
+ _h.label = 10;
204
+ case 10: return [2 /*return*/];
163
205
  }
164
206
  });
165
207
  }); };
@@ -184,7 +226,7 @@ var UploadList = function (props, ref) {
184
226
  // 图片下载
185
227
  var onDownload = function (file) {
186
228
  return __awaiter(void 0, void 0, void 0, function () {
187
- var endCallback, err_2;
229
+ var endCallback, err_4;
188
230
  return __generator(this, function (_a) {
189
231
  switch (_a.label) {
190
232
  case 0:
@@ -220,8 +262,8 @@ var UploadList = function (props, ref) {
220
262
  endCallback();
221
263
  return [3 /*break*/, 4];
222
264
  case 3:
223
- err_2 = _a.sent();
224
- console.log(err_2);
265
+ err_4 = _a.sent();
266
+ console.log(err_4);
225
267
  endCallback();
226
268
  return [3 /*break*/, 4];
227
269
  case 4: return [2 /*return*/];
@@ -342,7 +384,7 @@ var UploadList = function (props, ref) {
342
384
  onClick: function (e) {
343
385
  onBatchDownloadHandle(e.key);
344
386
  },
345
- }, placement: "bottomLeft" }, { children: jsx(ButtonCom, __assign({ type: "primary" }, { children: "\u6279\u91CF\u4E0B\u8F7D" })) }))) : null, customRenderBtn, showTable ? (jsx(UploadTable, { dataSource: uploadTableData, action: fileAction, headers: fileHeaders, data: fileData, method: method, setInnerFileList: setInnerFileList, isPublic: isPublic, API_BASEURL: API_BASEURL, FILE_API_BASEURL: FILE_API_BASEURL, maxPreviewSize: maxPreviewSize, isPreview: isPreview, isDelete: isDelete, isDownload: isDownload, ref: tableRef, listType: listType, tableColumns: tableColumns })) : null, isPreview && !showTable && !isImage ? (jsx(UploadListDetail, { dataSource: uploadTableData, action: fileAction, headers: fileHeaders, data: fileData, method: method, setInnerFileList: setInnerFileList, isPublic: isPublic, API_BASEURL: API_BASEURL, FILE_API_BASEURL: FILE_API_BASEURL, maxPreviewSize: maxPreviewSize, isPreview: isPreview, isDelete: isDelete, isDownload: isDownload, ref: tableRef, listType: listType, tableColumns: tableColumns })) : null, isImage && (jsx(ModalComponent, __assign({ ref: modalRef, footer: null, width: "520px" }, { children: jsx("div", __assign({ style: {
387
+ }, placement: "bottomLeft" }, { children: jsx(ButtonCom, __assign({ type: "primary" }, { children: "\u6279\u91CF\u4E0B\u8F7D" })) }))) : null, customRenderBtn, showTable ? (jsx(UploadTable, { dataSource: uploadTableData, action: fileAction, headers: fileHeaders, data: fileData, method: method, setInnerFileList: setInnerFileList, isPublic: isPublic, API_BASEURL: API_BASEURL, FILE_API_BASEURL: FILE_API_BASEURL, maxPreviewSize: maxPreviewSize, isPreview: isPreview, isDelete: isDelete, isDownload: isDownload, ref: tableRef, listType: listType, tableColumns: tableColumns, onBeforeDeleteValidate: onBeforeDeleteValidate, onBeforeDownloadValidate: onBeforeDownloadValidate, onBeforePreviewValidate: onBeforePreviewValidate })) : null, isPreview && !showTable && !isImage ? (jsx(UploadListDetail, { dataSource: uploadTableData, action: fileAction, headers: fileHeaders, data: fileData, method: method, setInnerFileList: setInnerFileList, isPublic: isPublic, API_BASEURL: API_BASEURL, FILE_API_BASEURL: FILE_API_BASEURL, maxPreviewSize: maxPreviewSize, isPreview: isPreview, isDelete: isDelete, isDownload: isDownload, ref: tableRef, listType: listType, tableColumns: tableColumns })) : null, isImage && (jsx(ModalComponent, __assign({ ref: modalRef, footer: null, width: "520px" }, { children: jsx("div", __assign({ style: {
346
388
  textAlign: "center",
347
389
  } }, { children: jsx("img", { src: imgSrc, alt: "\u9884\u89C8", style: {
348
390
  maxWidth: "400px",
@@ -12,7 +12,7 @@ import OperationBtn from '../operationbtn/operationBtn.js';
12
12
  import { Progress, message } from 'antd';
13
13
 
14
14
  var UploadTable = function (_a, ref) {
15
- var dataSource = _a.dataSource, action = _a.action, headers = _a.headers, data = _a.data, method = _a.method, setInnerFileList = _a.setInnerFileList, isPublic = _a.isPublic, _b = _a.API_BASEURL, API_BASEURL = _b === void 0 ? "" : _b, _c = _a.FILE_API_BASEURL, FILE_API_BASEURL = _c === void 0 ? "" : _c, maxPreviewSize = _a.maxPreviewSize, isPreview = _a.isPreview, isDelete = _a.isDelete, isDownload = _a.isDownload; _a.listType; var tableColumns = _a.tableColumns;
15
+ var dataSource = _a.dataSource, action = _a.action, headers = _a.headers, data = _a.data, method = _a.method, setInnerFileList = _a.setInnerFileList, isPublic = _a.isPublic, _b = _a.API_BASEURL, API_BASEURL = _b === void 0 ? "" : _b, _c = _a.FILE_API_BASEURL, FILE_API_BASEURL = _c === void 0 ? "" : _c, maxPreviewSize = _a.maxPreviewSize, isPreview = _a.isPreview, isDelete = _a.isDelete, isDownload = _a.isDownload; _a.listType; var tableColumns = _a.tableColumns, onBeforeDownloadValidate = _a.onBeforeDownloadValidate, onBeforePreviewValidate = _a.onBeforePreviewValidate, onBeforeDeleteValidate = _a.onBeforeDeleteValidate;
16
16
  var _d = useState(false), loading = _d[0], setLoading = _d[1];
17
17
  var _e = useState(), checked = _e[0], setChecked = _e[1];
18
18
  var isDownloadSingleBoolean = isDownload;
@@ -22,7 +22,7 @@ var UploadTable = function (_a, ref) {
22
22
  // const isDeleteBoolean = isDelete && !isPreview && listType !== "text";
23
23
  var isDeleteBoolean = isDelete && !isPreview;
24
24
  var operationCallback = function (type, record, index) { return __awaiter(void 0, void 0, void 0, function () {
25
- var attachId, attachName, _a, endCallback, err_1;
25
+ var attachId, attachName, _a, endCallback, canDownload, err_2, endCallback_1, canDownload, endCallback_2, isResult;
26
26
  return __generator(this, function (_b) {
27
27
  switch (_b.label) {
28
28
  case 0:
@@ -30,10 +30,10 @@ var UploadTable = function (_a, ref) {
30
30
  _a = type;
31
31
  switch (_a) {
32
32
  case "download": return [3 /*break*/, 1];
33
- case "preview": return [3 /*break*/, 6];
34
- case "delete": return [3 /*break*/, 7];
33
+ case "preview": return [3 /*break*/, 10];
34
+ case "delete": return [3 /*break*/, 15];
35
35
  }
36
- return [3 /*break*/, 8];
36
+ return [3 /*break*/, 20];
37
37
  case 1:
38
38
  setInnerFileList(function (innerFileList) {
39
39
  var newInnerFileList = innerFileList.slice();
@@ -49,31 +49,105 @@ var UploadTable = function (_a, ref) {
49
49
  };
50
50
  _b.label = 2;
51
51
  case 2:
52
- _b.trys.push([2, 4, , 5]);
53
- return [4 /*yield*/, downloadFile(attachId, attachName, {
54
- API_BASEURL: API_BASEURL,
55
- open: isPublic,
56
- })];
52
+ _b.trys.push([2, 8, , 9]);
53
+ if (!onBeforeDownloadValidate) return [3 /*break*/, 6];
54
+ _b.label = 3;
57
55
  case 3:
56
+ _b.trys.push([3, 5, , 6]);
57
+ return [4 /*yield*/, onBeforeDownloadValidate([record])];
58
+ case 4:
59
+ canDownload = _b.sent();
60
+ if (!canDownload) {
61
+ endCallback();
62
+ return [2 /*return*/];
63
+ }
64
+ return [3 /*break*/, 6];
65
+ case 5:
58
66
  _b.sent();
59
67
  endCallback();
60
- return [3 /*break*/, 5];
61
- case 4:
62
- err_1 = _b.sent();
63
- console.log(err_1);
68
+ return [2 /*return*/];
69
+ case 6: return [4 /*yield*/, downloadFile(attachId, attachName, {
70
+ API_BASEURL: API_BASEURL,
71
+ open: isPublic,
72
+ })];
73
+ case 7:
74
+ _b.sent();
64
75
  endCallback();
65
- return [3 /*break*/, 5];
66
- case 5:
76
+ return [3 /*break*/, 9];
77
+ case 8:
78
+ err_2 = _b.sent();
79
+ console.log(err_2);
80
+ endCallback();
81
+ return [3 /*break*/, 9];
82
+ case 9:
67
83
  // finally 可能再某些浏览器下不兼容
68
- return [3 /*break*/, 8];
69
- case 6:
84
+ return [3 /*break*/, 20];
85
+ case 10:
86
+ if (!onBeforePreviewValidate) return [3 /*break*/, 14];
87
+ setInnerFileList(function (innerFileList) {
88
+ var newInnerFileList = innerFileList.slice();
89
+ newInnerFileList.splice(index, 1, __assign(__assign({}, record), { loading: true }));
90
+ return newInnerFileList;
91
+ });
92
+ endCallback_1 = function () {
93
+ setInnerFileList(function (innerFileList) {
94
+ var newInnerFileList = innerFileList.slice();
95
+ newInnerFileList.splice(index, 1, __assign(__assign({}, record), { loading: false }));
96
+ return newInnerFileList;
97
+ });
98
+ };
99
+ _b.label = 11;
100
+ case 11:
101
+ _b.trys.push([11, 13, , 14]);
102
+ return [4 /*yield*/, onBeforePreviewValidate([record])];
103
+ case 12:
104
+ canDownload = _b.sent();
105
+ endCallback_1();
106
+ if (!canDownload) {
107
+ return [2 /*return*/];
108
+ }
109
+ return [3 /*break*/, 14];
110
+ case 13:
111
+ _b.sent();
112
+ endCallback_1();
113
+ return [2 /*return*/];
114
+ case 14:
70
115
  toPreviewFile(record, {
71
116
  maxPreviewSize: maxPreviewSize,
72
117
  FILE_API_BASEURL: FILE_API_BASEURL,
73
118
  uploadTableData: dataSource,
74
119
  });
75
- return [3 /*break*/, 8];
76
- case 7:
120
+ return [3 /*break*/, 20];
121
+ case 15:
122
+ if (!onBeforeDeleteValidate) return [3 /*break*/, 19];
123
+ setInnerFileList(function (innerFileList) {
124
+ var newInnerFileList = innerFileList.slice();
125
+ newInnerFileList.splice(index, 1, __assign(__assign({}, record), { loading: true }));
126
+ return newInnerFileList;
127
+ });
128
+ endCallback_2 = function () {
129
+ setInnerFileList(function (innerFileList) {
130
+ var newInnerFileList = innerFileList.slice();
131
+ newInnerFileList.splice(index, 1, __assign(__assign({}, record), { loading: false }));
132
+ return newInnerFileList;
133
+ });
134
+ };
135
+ _b.label = 16;
136
+ case 16:
137
+ _b.trys.push([16, 18, , 19]);
138
+ return [4 /*yield*/, onBeforeDeleteValidate([record])];
139
+ case 17:
140
+ isResult = _b.sent();
141
+ endCallback_2();
142
+ if (!isResult) {
143
+ return [2 /*return*/];
144
+ }
145
+ return [3 /*break*/, 19];
146
+ case 18:
147
+ _b.sent();
148
+ endCallback_2();
149
+ return [2 /*return*/];
150
+ case 19:
77
151
  setChecked(function (c) {
78
152
  if (Array.isArray(c)) {
79
153
  var copyC = c.slice();
@@ -87,8 +161,8 @@ var UploadTable = function (_a, ref) {
87
161
  newInnerFileList.splice(index, 1);
88
162
  return newInnerFileList;
89
163
  });
90
- return [3 /*break*/, 8];
91
- case 8: return [2 /*return*/];
164
+ return [3 /*break*/, 20];
165
+ case 20: return [2 /*return*/];
92
166
  }
93
167
  });
94
168
  }); };
@@ -239,6 +313,7 @@ var UploadTable = function (_a, ref) {
239
313
  statusBtnConfig.push({
240
314
  name: "预览",
241
315
  type: "preview",
316
+ loading: onBeforePreviewValidate ? loading : undefined,
242
317
  });
243
318
  if (isDeleteSingleBoolean) {
244
319
  statusBtnConfig.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-webui",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
4
4
  "private": false,
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",