@kdcloudjs/kdesign 1.8.1 → 1.8.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.
@@ -108,12 +108,12 @@ var PreviewGroup = function PreviewGroup(_ref) {
108
108
  onPrevious: onPrevious
109
109
  };
110
110
  return /*#__PURE__*/React.createElement(React.Fragment, null, images.length > 1 ? _mapInstanceProperty(_context3 = React.Children).call(_context3, children, function (image, index) {
111
- var _a;
111
+ var _a, _b;
112
112
  return /*#__PURE__*/React.cloneElement(image, {
113
113
  key: image.key || index,
114
114
  preview: false,
115
115
  ref: refs[index],
116
- onClick: onPreview.bind(null, index, (_a = image === null || image === void 0 ? void 0 : image.props) === null || _a === void 0 ? void 0 : _a.src)
116
+ onClick: ((_a = image === null || image === void 0 ? void 0 : image.props) === null || _a === void 0 ? void 0 : _a.preview) !== false ? onPreview.bind(null, index, (_b = image === null || image === void 0 ? void 0 : image.props) === null || _b === void 0 ? void 0 : _b.src) : undefined
117
117
  });
118
118
  }) : children, exit && /*#__PURE__*/React.createElement(Preview, _extends({}, previewProps)));
119
119
  };
@@ -120,12 +120,12 @@ var PreviewGroup = function PreviewGroup(_ref) {
120
120
  onPrevious: onPrevious
121
121
  };
122
122
  return /*#__PURE__*/React.createElement(React.Fragment, null, images.length > 1 ? (0, _map.default)(_context3 = React.Children).call(_context3, children, function (image, index) {
123
- var _a;
123
+ var _a, _b;
124
124
  return /*#__PURE__*/React.cloneElement(image, {
125
125
  key: image.key || index,
126
126
  preview: false,
127
127
  ref: refs[index],
128
- onClick: onPreview.bind(null, index, (_a = image === null || image === void 0 ? void 0 : image.props) === null || _a === void 0 ? void 0 : _a.src)
128
+ onClick: ((_a = image === null || image === void 0 ? void 0 : image.props) === null || _a === void 0 ? void 0 : _a.preview) !== false ? onPreview.bind(null, index, (_b = image === null || image === void 0 ? void 0 : image.props) === null || _b === void 0 ? void 0 : _b.src) : undefined
129
129
  });
130
130
  }) : children, exit && /*#__PURE__*/React.createElement(_preview.default, (0, _extends2.default)({}, previewProps)));
131
131
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [