@zat-design/sisyphus-react 3.3.0-beta.2 → 3.3.0-beta.4
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/es/ProEditTable/index.js
CHANGED
|
@@ -101,7 +101,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
101
101
|
var getRowKey = function getRowKey(record) {
|
|
102
102
|
var key = record.rowKey || getRandom();
|
|
103
103
|
if (rowKey) {
|
|
104
|
-
|
|
104
|
+
var _ref2;
|
|
105
|
+
key = (_ref2 = typeof rowKey === 'function' ? rowKey(record) : record[rowKey]) !== null && _ref2 !== void 0 ? _ref2 : key;
|
|
105
106
|
}
|
|
106
107
|
return key;
|
|
107
108
|
};
|
|
@@ -212,7 +213,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
212
213
|
return isForbiddenBtn('mulDelete') ? rowSelection : _rowSelection;
|
|
213
214
|
};
|
|
214
215
|
var setColumns = /*#__PURE__*/function () {
|
|
215
|
-
var
|
|
216
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
216
217
|
var nextColumns;
|
|
217
218
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
218
219
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -231,7 +232,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
231
232
|
}, _callee);
|
|
232
233
|
}));
|
|
233
234
|
return function setColumns() {
|
|
234
|
-
return
|
|
235
|
+
return _ref3.apply(this, arguments);
|
|
235
236
|
};
|
|
236
237
|
}();
|
|
237
238
|
useDebounceEffect(function () {
|
|
@@ -17,7 +17,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
17
17
|
* @Author: wangshengqiang
|
|
18
18
|
* @Date: 2023-07-27 20:13:07
|
|
19
19
|
* @LastEditors: wangshengqiang
|
|
20
|
-
* @LastEditTime: 2023-11-15
|
|
20
|
+
* @LastEditTime: 2023-11-21 15:24:56
|
|
21
21
|
* @Description: 图片类型
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
@@ -97,11 +97,11 @@ var ImageRender = function ImageRender(props) {
|
|
|
97
97
|
disabled: disabled || isView,
|
|
98
98
|
itemRender: function itemRender(originNode, file, fileList, actions) {
|
|
99
99
|
var _file$url, _locale$ProUpload, _locale$ProUpload2, _locale$ProUpload3;
|
|
100
|
-
var _showPreview = file.status === 'done';
|
|
101
100
|
var _isShowDownload = !!onDownload && file.status === 'done';
|
|
102
101
|
var _fileExt = getFileExt(file.name || (file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('?')[0]));
|
|
103
102
|
var _fileIcon = getFileIcon(_fileExt);
|
|
104
103
|
var isImg = ['.PNG', '.JPG', '.JPEG', '.GIF', '.BMP', '.JPE'].includes(_fileExt.toLocaleUpperCase());
|
|
104
|
+
var _showPreview = isImg;
|
|
105
105
|
return _jsx(DraggableUploadListItem, {
|
|
106
106
|
file: file,
|
|
107
107
|
children: _jsxs("div", {
|
|
@@ -255,8 +255,7 @@ var ImageRender = function ImageRender(props) {
|
|
|
255
255
|
style: {
|
|
256
256
|
width: '400px'
|
|
257
257
|
},
|
|
258
|
-
open:
|
|
259
|
-
// showType="Modal"
|
|
258
|
+
open: (previewImg === null || previewImg === void 0 ? void 0 : previewImg.url) || (previewImg === null || previewImg === void 0 ? void 0 : previewImg.thumbUrl),
|
|
260
259
|
wrapClassName: "proupload-modal-preview",
|
|
261
260
|
onCancel: handlePreviewCancel,
|
|
262
261
|
footer: false,
|
|
@@ -265,7 +264,7 @@ var ImageRender = function ImageRender(props) {
|
|
|
265
264
|
style: {
|
|
266
265
|
width: '100%'
|
|
267
266
|
},
|
|
268
|
-
src: previewImg === null || previewImg === void 0 ? void 0 : previewImg.url
|
|
267
|
+
src: (previewImg === null || previewImg === void 0 ? void 0 : previewImg.url) || previewImg.thumbUrl
|
|
269
268
|
})
|
|
270
269
|
})]
|
|
271
270
|
});
|
|
@@ -104,7 +104,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
104
104
|
var getRowKey = function getRowKey(record) {
|
|
105
105
|
var key = record.rowKey || (0, _tools.getRandom)();
|
|
106
106
|
if (rowKey) {
|
|
107
|
-
|
|
107
|
+
var _ref2;
|
|
108
|
+
key = (_ref2 = typeof rowKey === 'function' ? rowKey(record) : record[rowKey]) !== null && _ref2 !== void 0 ? _ref2 : key;
|
|
108
109
|
}
|
|
109
110
|
return key;
|
|
110
111
|
};
|
|
@@ -215,7 +216,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
215
216
|
return isForbiddenBtn('mulDelete') ? rowSelection : _rowSelection;
|
|
216
217
|
};
|
|
217
218
|
var setColumns = /*#__PURE__*/function () {
|
|
218
|
-
var
|
|
219
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
219
220
|
var nextColumns;
|
|
220
221
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
221
222
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -234,7 +235,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
234
235
|
}, _callee);
|
|
235
236
|
}));
|
|
236
237
|
return function setColumns() {
|
|
237
|
-
return
|
|
238
|
+
return _ref3.apply(this, arguments);
|
|
238
239
|
};
|
|
239
240
|
}();
|
|
240
241
|
(0, _ahooks.useDebounceEffect)(function () {
|
|
@@ -27,7 +27,7 @@ var _locale = _interopRequireDefault(require("../../locale"));
|
|
|
27
27
|
* @Author: wangshengqiang
|
|
28
28
|
* @Date: 2023-07-27 20:13:07
|
|
29
29
|
* @LastEditors: wangshengqiang
|
|
30
|
-
* @LastEditTime: 2023-11-15
|
|
30
|
+
* @LastEditTime: 2023-11-21 15:24:56
|
|
31
31
|
* @Description: 图片类型
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
@@ -95,11 +95,11 @@ var ImageRender = function ImageRender(props) {
|
|
|
95
95
|
disabled: disabled || isView,
|
|
96
96
|
itemRender: function itemRender(originNode, file, fileList, actions) {
|
|
97
97
|
var _file$url, _locale$ProUpload, _locale$ProUpload2, _locale$ProUpload3;
|
|
98
|
-
var _showPreview = file.status === 'done';
|
|
99
98
|
var _isShowDownload = !!onDownload && file.status === 'done';
|
|
100
99
|
var _fileExt = (0, _FileItem.getFileExt)(file.name || (file === null || file === void 0 ? void 0 : (_file$url = file.url) === null || _file$url === void 0 ? void 0 : _file$url.split('?')[0]));
|
|
101
100
|
var _fileIcon = (0, _FileItem.getFileIcon)(_fileExt);
|
|
102
101
|
var isImg = ['.PNG', '.JPG', '.JPEG', '.GIF', '.BMP', '.JPE'].includes(_fileExt.toLocaleUpperCase());
|
|
102
|
+
var _showPreview = isImg;
|
|
103
103
|
return (0, _jsxRuntime.jsx)(_DraggableUploadListItem.DraggableUploadListItem, {
|
|
104
104
|
file: file,
|
|
105
105
|
children: (0, _jsxRuntime.jsxs)("div", {
|
|
@@ -253,8 +253,7 @@ var ImageRender = function ImageRender(props) {
|
|
|
253
253
|
style: {
|
|
254
254
|
width: '400px'
|
|
255
255
|
},
|
|
256
|
-
open:
|
|
257
|
-
// showType="Modal"
|
|
256
|
+
open: (previewImg === null || previewImg === void 0 ? void 0 : previewImg.url) || (previewImg === null || previewImg === void 0 ? void 0 : previewImg.thumbUrl),
|
|
258
257
|
wrapClassName: "proupload-modal-preview",
|
|
259
258
|
onCancel: handlePreviewCancel,
|
|
260
259
|
footer: false,
|
|
@@ -263,7 +262,7 @@ var ImageRender = function ImageRender(props) {
|
|
|
263
262
|
style: {
|
|
264
263
|
width: '100%'
|
|
265
264
|
},
|
|
266
|
-
src: previewImg === null || previewImg === void 0 ? void 0 : previewImg.url
|
|
265
|
+
src: (previewImg === null || previewImg === void 0 ? void 0 : previewImg.url) || previewImg.thumbUrl
|
|
267
266
|
})
|
|
268
267
|
})]
|
|
269
268
|
});
|