@sheinx/base 3.5.3-beta.1 → 3.5.3-beta.3

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/cjs/table/tr.js CHANGED
@@ -212,29 +212,23 @@ var Tr = function Tr(props) {
212
212
  });
213
213
  }
214
214
  if (col.type === 'checkbox') {
215
- if (props.radio) {
216
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
217
- className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.iconWrapper,
218
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_radio.default, {
219
- jssStyle: props.jssStyle,
220
- style: {
221
- margin: 0
222
- },
223
- checked: props.isSelect,
224
- disabled: props.disabled,
225
- onChange: function onChange(value) {
226
- if (value) {
227
- props.datum.add(data);
228
- } else {
229
- props.datum.remove(data);
230
- }
231
- }
232
- })
233
- });
234
- }
235
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
215
+ var instance = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
236
216
  className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.iconWrapper,
237
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_checkbox.default, {
217
+ children: props.radio ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_radio.default, {
218
+ jssStyle: props.jssStyle,
219
+ style: {
220
+ margin: 0
221
+ },
222
+ checked: props.isSelect,
223
+ disabled: props.disabled,
224
+ onChange: function onChange(value) {
225
+ if (value) {
226
+ props.datum.add(data);
227
+ } else {
228
+ props.datum.remove(data);
229
+ }
230
+ }
231
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_checkbox.default, {
238
232
  jssStyle: props.jssStyle,
239
233
  disabled: props.disabled,
240
234
  style: {
@@ -254,6 +248,7 @@ var Tr = function Tr(props) {
254
248
  }
255
249
  })
256
250
  });
251
+ return typeof col.render === 'function' ? col.render(props.rawData, props.rowIndex, instance) : instance;
257
252
  }
258
253
  var content = _hooks.util.render(col.render, data, props.rowIndex);
259
254
  if (col.treeColumnsName) {
package/esm/table/tr.js CHANGED
@@ -206,29 +206,23 @@ var Tr = function Tr(props) {
206
206
  });
207
207
  }
208
208
  if (col.type === 'checkbox') {
209
- if (props.radio) {
210
- return /*#__PURE__*/_jsx("div", {
211
- className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.iconWrapper,
212
- children: /*#__PURE__*/_jsx(Radio, {
213
- jssStyle: props.jssStyle,
214
- style: {
215
- margin: 0
216
- },
217
- checked: props.isSelect,
218
- disabled: props.disabled,
219
- onChange: function onChange(value) {
220
- if (value) {
221
- props.datum.add(data);
222
- } else {
223
- props.datum.remove(data);
224
- }
225
- }
226
- })
227
- });
228
- }
229
- return /*#__PURE__*/_jsx("div", {
209
+ var instance = /*#__PURE__*/_jsx("div", {
230
210
  className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.iconWrapper,
231
- children: /*#__PURE__*/_jsx(Checkbox, {
211
+ children: props.radio ? /*#__PURE__*/_jsx(Radio, {
212
+ jssStyle: props.jssStyle,
213
+ style: {
214
+ margin: 0
215
+ },
216
+ checked: props.isSelect,
217
+ disabled: props.disabled,
218
+ onChange: function onChange(value) {
219
+ if (value) {
220
+ props.datum.add(data);
221
+ } else {
222
+ props.datum.remove(data);
223
+ }
224
+ }
225
+ }) : /*#__PURE__*/_jsx(Checkbox, {
232
226
  jssStyle: props.jssStyle,
233
227
  disabled: props.disabled,
234
228
  style: {
@@ -248,6 +242,7 @@ var Tr = function Tr(props) {
248
242
  }
249
243
  })
250
244
  });
245
+ return typeof col.render === 'function' ? col.render(props.rawData, props.rowIndex, instance) : instance;
251
246
  }
252
247
  var content = util.render(col.render, data, props.rowIndex);
253
248
  if (col.treeColumnsName) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/base",
3
- "version": "3.5.3-beta.1",
3
+ "version": "3.5.3-beta.3",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@
10
10
  "module": "./esm/index.js",
11
11
  "typings": "./cjs/index.d.ts",
12
12
  "dependencies": {
13
- "@sheinx/hooks": "3.5.3-beta.1",
13
+ "@sheinx/hooks": "3.5.3-beta.3",
14
14
  "immer": "^10.0.0",
15
15
  "classnames": "^2.0.0",
16
16
  "@shined/reactive": "^0.1.3-alpha.0"