shineout 3.7.7-beta.7 → 3.7.7-beta.9

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.7.7-beta.7'
525
+ version: '3.7.7-beta.9'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
12234
12234
  };
12235
12235
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12236
12236
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12237
- /* harmony default export */ var version = ('3.7.7-beta.7');
12237
+ /* harmony default export */ var version = ('3.7.7-beta.9');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -35572,6 +35572,26 @@ var getCompleteFieldKeys = function getCompleteFieldKeys(fields, allFields) {
35572
35572
  // 返回之前去重
35573
35573
  return Array.from(new Set(completeFields));
35574
35574
  };
35575
+
35576
+ /**
35577
+ * 将对象中的所有值设置为空, 如果值是数组,重置为空数组,如果是对象,重置为空对象,如果是基础类型,重置为undefined
35578
+ * @param obj 对象
35579
+ * @returns 空对象
35580
+ */
35581
+ var clearValue = function clearValue(obj) {
35582
+ if (isArray(obj)) {
35583
+ return obj.map(function (item) {
35584
+ return clearValue(item);
35585
+ });
35586
+ }
35587
+ if (is_isObject(obj)) {
35588
+ return Object.keys(obj).reduce(function (acc, key) {
35589
+ acc[key] = clearValue(obj[key]);
35590
+ return acc;
35591
+ }, {});
35592
+ }
35593
+ return undefined;
35594
+ };
35575
35595
  ;// CONCATENATED MODULE: ../hooks/src/components/use-check/use-check.ts
35576
35596
 
35577
35597
 
@@ -41366,7 +41386,7 @@ function getResetMore(onFilter, container, doms) {
41366
41386
  var paddingLeft = parsePxToNumber(style.paddingLeft);
41367
41387
  var paddingRight = parsePxToNumber(style.paddingRight);
41368
41388
  var minFilterWidth = onFilter ? 16 : 0;
41369
- var contentWidth = clientWidth - paddingLeft - paddingRight - minFilterWidth - 1;
41389
+ var contentWidth = clientWidth - paddingLeft - paddingRight - minFilterWidth;
41370
41390
  var hideEl = items.pop();
41371
41391
  var hideElStyle = getComputedStyle(hideEl);
41372
41392
  var hideMargin = parsePxToNumber(hideElStyle.marginLeft) + parsePxToNumber(hideElStyle.marginRight);
@@ -51710,8 +51730,13 @@ var FormFieldSet = function FormFieldSet(props) {
51710
51730
  },
51711
51731
  onInsert: function onInsert(val) {
51712
51732
  var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
51733
+ var insertValue = val;
51734
+ var valueTemplate = oldValue[i];
51735
+ if (insertValue === undefined) {
51736
+ insertValue = clearValue(deepClone(valueTemplate));
51737
+ }
51713
51738
  var newValue = form_fieldset_produce(oldValue, function (draft) {
51714
- draft.splice(i, 0, val);
51739
+ draft.splice(i, 0, insertValue);
51715
51740
  });
51716
51741
  _onChange(newValue);
51717
51742
  // context.ids.splice(i, 0, util.generateUUID());
@@ -51719,8 +51744,13 @@ var FormFieldSet = function FormFieldSet(props) {
51719
51744
  },
51720
51745
  onAppend: function onAppend(val) {
51721
51746
  var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
51747
+ var insertValue = val;
51748
+ var valueTemplate = oldValue[i];
51749
+ if (insertValue === undefined) {
51750
+ insertValue = clearValue(deepClone(valueTemplate));
51751
+ }
51722
51752
  var newValue = form_fieldset_produce(oldValue, function (draft) {
51723
- draft.splice(i + 1, 0, val);
51753
+ draft.splice(i + 1, 0, insertValue);
51724
51754
  });
51725
51755
  _onChange(newValue);
51726
51756
  // context.ids.splice(i + 1, 0, util.generateUUID());
@@ -68931,6 +68961,10 @@ var useInputClick = function useInputClick() {
68931
68961
  type: 'file',
68932
68962
  style: {
68933
68963
  display: 'none'
68964
+ },
68965
+ onClick: function onClick(event) {
68966
+ // 阻止程序化触发(inputRef.current.click())的input点击事件冒泡
68967
+ event.stopPropagation();
68934
68968
  }
68935
68969
  };
68936
68970
  var wrapperProps = {
@@ -71804,7 +71838,7 @@ var upload_interface = __webpack_require__(8821);
71804
71838
 
71805
71839
 
71806
71840
  /* harmony default export */ var src_0 = ({
71807
- version: '3.7.7-beta.7'
71841
+ version: '3.7.7-beta.9'
71808
71842
  });
71809
71843
  }();
71810
71844
  /******/ return __webpack_exports__;