cloud-b2b 1.1.7 → 1.1.10
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/es/CodeInput/CodeInput.js +3 -5
- package/es/NumberInput/NumberInput.js +2 -2
- package/es/SuperForm2/SuperForm.js +32 -9
- package/es/SuperTable2/SuperTable2.js +288 -65
- package/es/SuperUpload/SuperUpload.js +2 -2
- package/lib/CodeInput/CodeInput.js +3 -5
- package/lib/NumberInput/NumberInput.js +2 -2
- package/lib/SuperForm2/SuperForm.js +32 -9
- package/lib/SuperTable2/SuperTable2.js +295 -68
- package/lib/SuperUpload/SuperUpload.js +2 -2
- package/package.json +1 -1
|
@@ -76,12 +76,10 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
76
76
|
|
|
77
77
|
case 3:
|
|
78
78
|
if (!_context.sent) {
|
|
79
|
-
_context.next =
|
|
79
|
+
_context.next = 7;
|
|
80
80
|
break;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
debugger;
|
|
84
|
-
|
|
85
83
|
_this.setState({
|
|
86
84
|
time: _this.props.time || 60
|
|
87
85
|
});
|
|
@@ -97,10 +95,10 @@ var CodeInput = /*#__PURE__*/function (_React$Component) {
|
|
|
97
95
|
}
|
|
98
96
|
}, 1000);
|
|
99
97
|
|
|
100
|
-
case
|
|
98
|
+
case 7:
|
|
101
99
|
;
|
|
102
100
|
|
|
103
|
-
case
|
|
101
|
+
case 8:
|
|
104
102
|
case "end":
|
|
105
103
|
return _context.stop();
|
|
106
104
|
}
|
|
@@ -166,9 +166,9 @@ var NumberInput = /*#__PURE__*/function (_React$Component) {
|
|
|
166
166
|
if (!invalid) {
|
|
167
167
|
onChange && onChange(value);
|
|
168
168
|
}
|
|
169
|
-
}
|
|
170
169
|
|
|
171
|
-
|
|
170
|
+
onBlur && onBlur(event); //有输入才触发外部失去焦点事件,避免非必要请求
|
|
171
|
+
}
|
|
172
172
|
});
|
|
173
173
|
|
|
174
174
|
_defineProperty(_assertThisInitialized(_this), "hasSpecialChar", function (value) {
|
|
@@ -9,8 +9,9 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
|
|
|
9
9
|
import _Row from "antd/es/row";
|
|
10
10
|
import _Col from "antd/es/col";
|
|
11
11
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
12
|
-
import
|
|
12
|
+
import _Tooltip from "antd/es/tooltip";
|
|
13
13
|
import _Icon from "antd/es/icon";
|
|
14
|
+
import _Checkbox from "antd/es/checkbox";
|
|
14
15
|
import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
15
16
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
16
17
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
@@ -30,7 +31,7 @@ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance
|
|
|
30
31
|
|
|
31
32
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
33
|
|
|
33
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var
|
|
34
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context24, _context25; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context24 = ownKeys(Object(source), !0)).call(_context24, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context25 = ownKeys(Object(source))).call(_context25, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
34
35
|
|
|
35
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
36
37
|
|
|
@@ -45,7 +46,7 @@ import variables from '../variables';
|
|
|
45
46
|
var FormItem = _Form.Item;
|
|
46
47
|
var defaultSize = 'large';
|
|
47
48
|
var defaultColNum = 4;
|
|
48
|
-
var TYPE = ['readonly', 'text', 'search', 'searchText', 'select', 'selectText', 'radioGroup', 'number', 'date', 'textArea', 'password', 'editor', 'selectWriting', 'selectSearch', 'empty', 'captcha', 'area', 'uploadImg', 'cascader'];
|
|
49
|
+
var TYPE = ['readonly', 'text', 'search', 'searchText', 'select', 'selectText', 'radioGroup', 'number', 'date', 'textArea', 'password', 'editor', 'selectWriting', 'selectSearch', 'empty', 'captcha', 'area', 'uploadImg', 'cascader', 'checkbox'];
|
|
49
50
|
/**
|
|
50
51
|
* key:[必须],用于唯一标识该Form下的一个表单元素
|
|
51
52
|
* title:[必须],表单元素的标签
|
|
@@ -133,7 +134,7 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
133
134
|
* checkable:是否显示checkbox选择框
|
|
134
135
|
* onOpenChange:控制日期框显示隐藏回调func(key, open)
|
|
135
136
|
* onAreaSearch:联级选择器触发,原型为func(key - 当前联级key, title - 输入值, parentKey - 主体联级key)
|
|
136
|
-
*
|
|
137
|
+
* onFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
|
|
137
138
|
*/
|
|
138
139
|
|
|
139
140
|
|
|
@@ -571,6 +572,17 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
571
572
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
572
573
|
});
|
|
573
574
|
|
|
575
|
+
_defineProperty(_assertThisInitialized(_this2), "toCheckbox", function (props, control) {
|
|
576
|
+
var _context21;
|
|
577
|
+
|
|
578
|
+
var options = control.options || [];
|
|
579
|
+
return /*#__PURE__*/React.createElement(_Checkbox.Group, {
|
|
580
|
+
options: options,
|
|
581
|
+
onChange: _bindInstanceProperty(_context21 = _this2.onBlur).call(_context21, _assertThisInitialized(_this2), control.key),
|
|
582
|
+
value: _this2.props.value[control.key]
|
|
583
|
+
});
|
|
584
|
+
});
|
|
585
|
+
|
|
574
586
|
_defineProperty(_assertThisInitialized(_this2), "toControl", function (props, control) {
|
|
575
587
|
switch (props.type) {
|
|
576
588
|
case 'readonly':
|
|
@@ -626,6 +638,9 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
626
638
|
case 'cascader':
|
|
627
639
|
return _this2.toCascader(props, control);
|
|
628
640
|
|
|
641
|
+
case 'checkbox':
|
|
642
|
+
return _this2.toCheckbox(props, control);
|
|
643
|
+
|
|
629
644
|
default:
|
|
630
645
|
return 'type error';
|
|
631
646
|
}
|
|
@@ -634,18 +649,26 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
634
649
|
_defineProperty(_assertThisInitialized(_this2), "toLabel", function (_ref11, type) {
|
|
635
650
|
var title = _ref11.title,
|
|
636
651
|
showAdd = _ref11.showAdd,
|
|
637
|
-
key = _ref11.key
|
|
652
|
+
key = _ref11.key,
|
|
653
|
+
showInfo = _ref11.showInfo,
|
|
654
|
+
showInfoTitle = _ref11.showInfoTitle;
|
|
638
655
|
|
|
639
656
|
if (showAdd && type !== 'readonly') {
|
|
640
|
-
var
|
|
657
|
+
var _context22;
|
|
641
658
|
|
|
642
|
-
var onClick = _bindInstanceProperty(
|
|
659
|
+
var onClick = _bindInstanceProperty(_context22 = _this2.onAdd).call(_context22, _assertThisInitialized(_this2), key, title);
|
|
643
660
|
|
|
644
661
|
return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
|
|
645
662
|
role: "add",
|
|
646
663
|
type: "plus-circle-o",
|
|
647
664
|
onClick: onClick
|
|
648
665
|
}));
|
|
666
|
+
} else if (showInfo) {
|
|
667
|
+
return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Tooltip, {
|
|
668
|
+
title: showInfoTitle
|
|
669
|
+
}, /*#__PURE__*/React.createElement(_Icon, {
|
|
670
|
+
type: "info-circle"
|
|
671
|
+
})));
|
|
649
672
|
} else {
|
|
650
673
|
return title;
|
|
651
674
|
}
|
|
@@ -701,7 +724,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
701
724
|
});
|
|
702
725
|
|
|
703
726
|
_defineProperty(_assertThisInitialized(_this2), "toCols", function () {
|
|
704
|
-
var
|
|
727
|
+
var _context23;
|
|
705
728
|
|
|
706
729
|
var _this2$props4 = _this2.props,
|
|
707
730
|
_this2$props4$colNum = _this2$props4.colNum,
|
|
@@ -713,7 +736,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
713
736
|
}
|
|
714
737
|
|
|
715
738
|
var span = 24 / colNum;
|
|
716
|
-
return _mapInstanceProperty(
|
|
739
|
+
return _mapInstanceProperty(_context23 = _this2.getControls()).call(_context23, function (control) {
|
|
717
740
|
if (allFullFather) {
|
|
718
741
|
control.allFullFather = allFullFather;
|
|
719
742
|
}
|