shineout 3.8.0-beta.33 → 3.8.0-beta.34

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
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.8.0-beta.33'
525
+ version: '3.8.0-beta.34'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
12386
12386
  };
12387
12387
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12388
12388
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12389
- /* harmony default export */ var version = ('3.8.0-beta.33');
12389
+ /* harmony default export */ var version = ('3.8.0-beta.34');
12390
12390
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12391
12391
 
12392
12392
 
@@ -35999,11 +35999,19 @@ var useCheck = function useCheck(props) {
35999
35999
  var handleInputRef = use_fork_ref(inputRef, inputRefPo);
36000
36000
  var handleClick = function handleClick(otherHandlers, needStopPropagation) {
36001
36001
  return function (event) {
36002
- var _inputRef$current, _otherHandlers$onClic;
36002
+ var _otherHandlers$onClic;
36003
36003
  if (needStopPropagation) {
36004
36004
  event.stopPropagation();
36005
36005
  }
36006
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.click();
36006
+
36007
+ // 检查是否被 label 元素包裹,如果是则不需要手动触发 input.click()
36008
+ // 因为 label 会自动将点击事件传递给内部的 input 元素
36009
+ var target = event.currentTarget;
36010
+ var isInsideLabel = target.closest('label') !== null;
36011
+ if (!isInsideLabel) {
36012
+ var _inputRef$current;
36013
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.click();
36014
+ }
36007
36015
  otherHandlers === null || otherHandlers === void 0 || (_otherHandlers$onClic = otherHandlers.onClick) === null || _otherHandlers$onClic === void 0 || _otherHandlers$onClic.call(otherHandlers, event);
36008
36016
  };
36009
36017
  };
@@ -72884,7 +72892,7 @@ var upload_interface = __webpack_require__(8821);
72884
72892
 
72885
72893
 
72886
72894
  /* harmony default export */ var src_0 = ({
72887
- version: '3.8.0-beta.33'
72895
+ version: '3.8.0-beta.34'
72888
72896
  });
72889
72897
  }();
72890
72898
  /******/ return __webpack_exports__;