shineout 3.9.17-beta.3 → 3.9.17-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/cjs/index.js CHANGED
@@ -529,5 +529,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
529
529
  // 此文件由脚本自动生成,请勿直接修改。
530
530
  // This file was generated automatically by a script. Please do not modify it directly.
531
531
  var _default = exports.default = {
532
- version: '3.9.17-beta.3'
532
+ version: '3.9.17-beta.4'
533
533
  };
@@ -31,8 +31,15 @@ var BaseUploadImage = function BaseUploadImage(props) {
31
31
  };
32
32
  BaseUploadImage.displayName = 'ShineoutUploadImage';
33
33
  var _default = exports.default = function _default(props) {
34
+ var _props$htmlName;
34
35
  var customProps = (0, _useUploadCommon.default)({
35
36
  rules: props.rules
36
37
  });
37
- return (0, _useFieldCommon.default)(_objectSpread(_objectSpread({}, props), customProps), BaseUploadImage);
38
+
39
+ // 同 upload.tsx:useFieldCommon 会把 name 从子组件 props 中移除,
40
+ // 提前将其作为 htmlName 的 fallback 保存,以兼容 v2 中 name 作为 FormData 键名的行为。
41
+ var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
42
+ return (0, _useFieldCommon.default)(_objectSpread(_objectSpread({}, props), {}, {
43
+ htmlName: htmlName
44
+ }, customProps), BaseUploadImage);
38
45
  };
@@ -31,8 +31,16 @@ var BaseUpload = function BaseUpload(props) {
31
31
  };
32
32
  BaseUpload.displayName = 'ShineoutUpload';
33
33
  var _default = exports.default = function _default(props) {
34
+ var _props$htmlName;
34
35
  var customProps = (0, _useUploadCommon.default)({
35
36
  rules: props.rules
36
37
  });
37
- return (0, _useFieldCommon.default)(_objectSpread(_objectSpread({}, props), customProps), BaseUpload, 'array');
38
+
39
+ // useFieldCommon 会把 name 从转发给子组件的 props 中移除(name 被用作 Form 字段 key)。
40
+ // 但 Upload 的 name 在 v2 中同时作为 FormData 的键名,为了兼容 v2 行为,
41
+ // 在 name 被移除之前将其作为 htmlName 的 fallback 保存下来。
42
+ var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
43
+ return (0, _useFieldCommon.default)(_objectSpread(_objectSpread({}, props), {}, {
44
+ htmlName: htmlName
45
+ }, customProps), BaseUpload, 'array');
38
46
  };
package/dist/shineout.js CHANGED
@@ -12327,7 +12327,7 @@ var handleStyle = function handleStyle(style) {
12327
12327
  };
12328
12328
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12329
12329
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12330
- /* harmony default export */ var version = ('3.9.17-beta.3');
12330
+ /* harmony default export */ var version = ('3.9.17-beta.4');
12331
12331
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12332
12332
 
12333
12333
 
@@ -74549,10 +74549,18 @@ var BaseUpload = function BaseUpload(props) {
74549
74549
  };
74550
74550
  BaseUpload.displayName = 'ShineoutUpload';
74551
74551
  /* harmony default export */ var src_upload_upload_0 = (function (props) {
74552
+ var _props$htmlName;
74552
74553
  var customProps = use_upload_common({
74553
74554
  rules: props.rules
74554
74555
  });
74555
- return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), customProps), BaseUpload, 'array');
74556
+
74557
+ // useFieldCommon 会把 name 从转发给子组件的 props 中移除(name 被用作 Form 字段 key)。
74558
+ // 但 Upload 的 name 在 v2 中同时作为 FormData 的键名,为了兼容 v2 行为,
74559
+ // 在 name 被移除之前将其作为 htmlName 的 fallback 保存下来。
74560
+ var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
74561
+ return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), {}, {
74562
+ htmlName: htmlName
74563
+ }, customProps), BaseUpload, 'array');
74556
74564
  });
74557
74565
  ;// CONCATENATED MODULE: ../base/src/upload/image.tsx
74558
74566
 
@@ -74590,10 +74598,17 @@ var BaseUploadImage = function BaseUploadImage(props) {
74590
74598
  };
74591
74599
  BaseUploadImage.displayName = 'ShineoutUploadImage';
74592
74600
  /* harmony default export */ var src_upload_image = (function (props) {
74601
+ var _props$htmlName;
74593
74602
  var customProps = use_upload_common({
74594
74603
  rules: props.rules
74595
74604
  });
74596
- return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), customProps), BaseUploadImage);
74605
+
74606
+ // 同 upload.tsx:useFieldCommon 会把 name 从子组件 props 中移除,
74607
+ // 提前将其作为 htmlName 的 fallback 保存,以兼容 v2 中 name 作为 FormData 键名的行为。
74608
+ var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
74609
+ return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), {}, {
74610
+ htmlName: htmlName
74611
+ }, customProps), BaseUploadImage);
74597
74612
  });
74598
74613
  ;// CONCATENATED MODULE: ../base/src/upload/button.tsx
74599
74614
 
@@ -77126,7 +77141,7 @@ var upload_interface = __webpack_require__(8821);
77126
77141
 
77127
77142
 
77128
77143
  /* harmony default export */ var src_0 = ({
77129
- version: '3.9.17-beta.3'
77144
+ version: '3.9.17-beta.4'
77130
77145
  });
77131
77146
  }();
77132
77147
  /******/ return __webpack_exports__;