ztxkui 3.4.16 → 3.4.17
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.
|
@@ -143,9 +143,10 @@ var UploadTable = function (_a) {
|
|
|
143
143
|
? true
|
|
144
144
|
: false;
|
|
145
145
|
return (React.createElement(React.Fragment, null,
|
|
146
|
-
(typeof operationAuth === 'string'
|
|
146
|
+
((typeof operationAuth === 'string'
|
|
147
147
|
? authDownloadBtn
|
|
148
|
-
: showDownloadBtn)
|
|
148
|
+
: showDownloadBtn) ||
|
|
149
|
+
(record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024) && (React.createElement(Button, { type: "link", style: {
|
|
149
150
|
height: 28,
|
|
150
151
|
}, onClick: function () {
|
|
151
152
|
if (isPublic) {
|
|
@@ -231,8 +232,25 @@ var UploadTable = function (_a) {
|
|
|
231
232
|
ellipsis: false,
|
|
232
233
|
fixed: 'right',
|
|
233
234
|
render: function (text, record, index) {
|
|
235
|
+
var operationAuth = record === null || record === void 0 ? void 0 : record.operationAuth;
|
|
236
|
+
// '1' 预览 '2' 下载 '3' 删除
|
|
237
|
+
var authDownloadBtn = typeof operationAuth === 'string' &&
|
|
238
|
+
operationAuth.indexOf('2') !== -1
|
|
239
|
+
? true
|
|
240
|
+
: false;
|
|
241
|
+
var authPreviewBtn = typeof operationAuth === 'string' &&
|
|
242
|
+
operationAuth.indexOf('1') !== -1
|
|
243
|
+
? true
|
|
244
|
+
: false;
|
|
245
|
+
var authDeleteBtn = typeof operationAuth === 'string' &&
|
|
246
|
+
operationAuth.indexOf('3') !== -1
|
|
247
|
+
? true
|
|
248
|
+
: false;
|
|
234
249
|
return (React.createElement(React.Fragment, null,
|
|
235
|
-
|
|
250
|
+
((typeof operationAuth === 'string'
|
|
251
|
+
? authDownloadBtn
|
|
252
|
+
: showDownloadBtn) ||
|
|
253
|
+
(record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024) && (React.createElement(Button, { type: "link", style: {
|
|
236
254
|
height: 28,
|
|
237
255
|
}, onClick: function () {
|
|
238
256
|
if (isPublic) {
|
|
@@ -254,7 +272,9 @@ var UploadTable = function (_a) {
|
|
|
254
272
|
});
|
|
255
273
|
}
|
|
256
274
|
} }, "\u4E0B\u8F7D")),
|
|
257
|
-
|
|
275
|
+
(typeof operationAuth === 'string'
|
|
276
|
+
? authPreviewBtn
|
|
277
|
+
: showPreviewBtn) && (React.createElement(Button, { type: "link", style: {
|
|
258
278
|
height: 28,
|
|
259
279
|
}, onClick: function () {
|
|
260
280
|
if ((record === null || record === void 0 ? void 0 : record.fileSize) >= 10 * 1024 * 1024) {
|
|
@@ -269,7 +289,9 @@ var UploadTable = function (_a) {
|
|
|
269
289
|
onPreviewCallbackBefore(record);
|
|
270
290
|
}
|
|
271
291
|
} }, "\u9884\u89C8")),
|
|
272
|
-
|
|
292
|
+
(typeof operationAuth === 'string'
|
|
293
|
+
? authDeleteBtn
|
|
294
|
+
: showDeleteBtn) && (React.createElement(Popconfirm, { title: "\u662F\u5426\u5220\u9664\u8BE5\u6761\u6570\u636E?", cancelText: "\u5426", okText: "\u662F", onConfirm: function () { return onDeleteFile(record, index); } },
|
|
273
295
|
React.createElement(Button, { style: {
|
|
274
296
|
height: 28,
|
|
275
297
|
}, type: "link" }, "\u5220\u9664")))));
|