shineout 3.5.7-beta.7 → 3.5.8-beta.1

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/index.js CHANGED
@@ -507,5 +507,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
507
507
  // 此文件由脚本自动生成,请勿直接修改。
508
508
  // This file was generated automatically by a script. Please do not modify it directly.
509
509
  var _default = exports.default = {
510
- version: '3.5.7-beta.7'
510
+ version: '3.5.8-beta.1'
511
511
  };
package/dist/shineout.js CHANGED
@@ -12040,7 +12040,7 @@ var handleStyle = function handleStyle(style) {
12040
12040
  };
12041
12041
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12042
12042
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12043
- /* harmony default export */ var version = ('3.5.7-beta.7');
12043
+ /* harmony default export */ var version = ('3.5.8-beta.1');
12044
12044
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12045
12045
 
12046
12046
 
@@ -34340,6 +34340,9 @@ var getCompleteFieldKeys = function getCompleteFieldKeys(fields, allFields) {
34340
34340
  var completeFields = [];
34341
34341
  fieldsArray.forEach(function (field) {
34342
34342
  var na = "".concat(field, "[");
34343
+ if (field.endsWith(']')) {
34344
+ na = field;
34345
+ }
34343
34346
  var no = "".concat(field, ".");
34344
34347
  completeFields.push(field);
34345
34348
  var childFields = allFields.filter(function (f) {
@@ -37880,6 +37883,7 @@ var CascaderNode = function CascaderNode(props) {
37880
37883
  handleChange(null, !checked);
37881
37884
  };
37882
37885
  var isHoverAble = expandTrigger === 'hover' || expandTrigger === 'hover-only';
37886
+ var isRealLeafNode = !hasChildren && !uncertainChildren;
37883
37887
  var getEvents = function getEvents() {
37884
37888
  var events = {};
37885
37889
  if (expandTrigger !== 'hover-only' || !hasChildren) {
@@ -37888,6 +37892,9 @@ var CascaderNode = function CascaderNode(props) {
37888
37892
  if (isHoverAble) {
37889
37893
  events.onMouseEnter = handlePathChange;
37890
37894
  if (multiple) events.onClick = handleSelect;
37895
+ } else if (isRealLeafNode && multiple) {
37896
+ // 非hover模式下: 末级节点支持整个节点区域点击选中checkbox
37897
+ events.onClick = handleSelect;
37891
37898
  }
37892
37899
  return events;
37893
37900
  };
@@ -37920,9 +37927,10 @@ var CascaderNode = function CascaderNode(props) {
37920
37927
  }
37921
37928
  return null;
37922
37929
  };
37930
+ var events = getEvents();
37923
37931
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
37924
37932
  className: rootClass
37925
- }, getEvents()), {}, {
37933
+ }, events), {}, {
37926
37934
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
37927
37935
  className: classnames_default()(styles.optionInner),
37928
37936
  children: [multiple && !(shouldFinal && hasChildren) && /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_checkbox_checkbox
@@ -37933,7 +37941,7 @@ var CascaderNode = function CascaderNode(props) {
37933
37941
  className: styles.optionCheckbox,
37934
37942
  checked: datum.getChecked(id),
37935
37943
  disabled: isDisabled,
37936
- onChange: isHoverAble && multiple ? undefined : handleChange
37944
+ onChange: events.onClick === handleSelect ? undefined : handleChange
37937
37945
  }), renderContent(), renderIcon()]
37938
37946
  })
37939
37947
  }));
@@ -39944,7 +39952,7 @@ var Cascader = function Cascader(props0) {
39944
39952
  if (filterText !== undefined) {
39945
39953
  updatePath();
39946
39954
  }
39947
- }, [filterText]);
39955
+ }, [filterText, firstMatchNode]);
39948
39956
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
39949
39957
  updatePathByValue();
39950
39958
 
@@ -67410,7 +67418,7 @@ var upload_interface = __webpack_require__(8821);
67410
67418
 
67411
67419
 
67412
67420
  /* harmony default export */ var src_0 = ({
67413
- version: '3.5.7-beta.7'
67421
+ version: '3.5.8-beta.1'
67414
67422
  });
67415
67423
  }();
67416
67424
  /******/ return __webpack_exports__;