@kdcloudjs/kdesign 1.7.29 → 1.7.30
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/CHANGELOG.md +30 -0
- package/dist/kdesign-complete.less +5 -3
- package/dist/kdesign.css +5 -4
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +70 -51
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +2 -2
- package/dist/kdesign.min.js.map +1 -1
- package/es/checkbox/checkbox.js +17 -12
- package/es/city-picker/city-picker.js +36 -22
- package/es/city-picker/style/index.css +4 -3
- package/es/city-picker/style/index.less +2 -1
- package/es/city-picker/style/token.less +3 -2
- package/es/grid/row.js +2 -2
- package/es/select/select.js +10 -10
- package/lib/checkbox/checkbox.js +17 -12
- package/lib/city-picker/city-picker.js +36 -22
- package/lib/city-picker/style/index.css +4 -3
- package/lib/city-picker/style/index.less +2 -1
- package/lib/city-picker/style/token.less +3 -2
- package/lib/grid/row.js +2 -2
- package/lib/select/select.js +10 -10
- package/package.json +1 -1
package/lib/grid/row.js
CHANGED
|
@@ -89,9 +89,9 @@ var Row = function Row(props) {
|
|
|
89
89
|
}
|
|
90
90
|
var rowStyle = {
|
|
91
91
|
'row-gap': "".concat(gap.v, "px"),
|
|
92
|
-
margin: "0 ".concat(-1 * gap.h, "px")
|
|
92
|
+
margin: "0 ".concat(-1 * gap.h / 2, "px")
|
|
93
93
|
};
|
|
94
|
-
if (gap.v && isSogouOrIe) rowStyle['margin-bottom'] = "".concat(-1 * gap.v
|
|
94
|
+
if (gap.v && isSogouOrIe) rowStyle['margin-bottom'] = "".concat(-1 * gap.v, "px");
|
|
95
95
|
var toalign = {
|
|
96
96
|
top: 'flex-start',
|
|
97
97
|
middle: 'center',
|
package/lib/select/select.js
CHANGED
|
@@ -468,7 +468,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
468
468
|
var arrowIconCls = (0, _classnames.default)((_classNames7 = {}, (0, _defineProperty2.default)(_classNames7, "".concat(selectPrefixCls, "-icon-arrow"), true), (0, _defineProperty2.default)(_classNames7, "".concat(selectPrefixCls, "-icon-arrow-up"), optionShow), (0, _defineProperty2.default)(_classNames7, "".concat(selectPrefixCls, "-icon-arrow-down"), !optionShow), (0, _defineProperty2.default)(_classNames7, "".concat(selectPrefixCls, "-icon-arrow-focus"), optionShow), _classNames7));
|
|
469
469
|
var iconShow = allowClear && !disabled && ((isMultiple ? mulOptions.length > 0 : (singleVal !== null && singleVal !== void 0 ? singleVal : '') !== '') || searchValue);
|
|
470
470
|
var clearIconCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-icon-clear"), true));
|
|
471
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, iconShow
|
|
471
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, iconShow ? /*#__PURE__*/_react.default.createElement("span", {
|
|
472
472
|
onClick: handleReset,
|
|
473
473
|
onMouseDown: function onMouseDown(e) {
|
|
474
474
|
return e.preventDefault();
|
|
@@ -477,11 +477,11 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
477
477
|
ref: clearRef
|
|
478
478
|
}, clearIcon || /*#__PURE__*/_react.default.createElement(_index.Icon, {
|
|
479
479
|
type: "close-solid"
|
|
480
|
-
})), showArrow
|
|
480
|
+
})) : null, showArrow ? /*#__PURE__*/_react.default.createElement("span", {
|
|
481
481
|
className: arrowIconCls
|
|
482
482
|
}, suffixIcon || /*#__PURE__*/_react.default.createElement(_index.Icon, {
|
|
483
483
|
type: "arrow-down"
|
|
484
|
-
})));
|
|
484
|
+
})) : null);
|
|
485
485
|
};
|
|
486
486
|
var renderOption = function renderOption(child, index) {
|
|
487
487
|
if ((child === null || child === void 0 ? void 0 : child.props) && (child.type.displayName === 'Option' || child.type.name === 'Option')) {
|
|
@@ -580,7 +580,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
580
580
|
className: dropDownCls,
|
|
581
581
|
style: dropdownStyle,
|
|
582
582
|
ref: dropDownRef
|
|
583
|
-
}, !dropdownRender && childrenToRender.length > 0
|
|
583
|
+
}, !dropdownRender && childrenToRender.length > 0 ? dropRender(eleOptionList, heightStyle) : null, renderNotContent(), /*#__PURE__*/_react.default.createElement("div", null, dropdownRender ? dropdownRender(dropRender(childrenToRender, heightStyle)) : null), isMultiple && realChildren.length > 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
584
584
|
className: multipleFooterCls
|
|
585
585
|
}, /*#__PURE__*/_react.default.createElement(_index.Checkbox, {
|
|
586
586
|
style: checkboxStyle,
|
|
@@ -589,7 +589,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
589
589
|
onChange: handleSelectAll
|
|
590
590
|
}, "\u5168\u9009"), /*#__PURE__*/_react.default.createElement("span", {
|
|
591
591
|
className: "".concat(selectPrefixCls, "-multiple-footer-hadSelected")
|
|
592
|
-
}, "\u5DF2\u9009", /*#__PURE__*/_react.default.createElement("span", null, selectedVal.length), "\u9879"))));
|
|
592
|
+
}, "\u5DF2\u9009", /*#__PURE__*/_react.default.createElement("span", null, selectedVal.length), "\u9879")) : null));
|
|
593
593
|
};
|
|
594
594
|
// 处理多选tag
|
|
595
595
|
var handleMaxTagHolder = (0, _react.useCallback)(function () {
|
|
@@ -664,10 +664,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
664
664
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
665
665
|
className: multipleCls,
|
|
666
666
|
ref: selectionRef
|
|
667
|
-
}, Array.isArray(mulOptions)
|
|
667
|
+
}, Array.isArray(mulOptions) ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _map.default)(mulOptions).call(mulOptions, function (item, index) {
|
|
668
668
|
var label = item.label,
|
|
669
669
|
value = item.value;
|
|
670
|
-
return
|
|
670
|
+
return !maxTagCount || index <= maxTagCount - 1 ? /*#__PURE__*/_react.default.createElement("span", {
|
|
671
671
|
key: value,
|
|
672
672
|
className: (0, _classnames.default)("".concat(selectPrefixCls, "-selection-tag")),
|
|
673
673
|
onMouseDown: function onMouseDown(e) {
|
|
@@ -689,12 +689,12 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
689
689
|
return handleRemove(e, value);
|
|
690
690
|
},
|
|
691
691
|
"data-tag": value
|
|
692
|
-
}, label));
|
|
692
|
+
}, label)) : null;
|
|
693
693
|
}), maxTagCount && mulOptions.length > maxTagCount ? maxTagPlaceholder ? handleMaxTagHolder() : /*#__PURE__*/_react.default.createElement("span", {
|
|
694
694
|
className: itemCls
|
|
695
695
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
696
696
|
className: "".concat(selectPrefixCls, "-selection-item-content")
|
|
697
|
-
}, "\u5171", mulOptions.length, "\u9879")) : null), /*#__PURE__*/_react.default.createElement("span", {
|
|
697
|
+
}, "\u5171", mulOptions.length, "\u9879")) : null) : null, /*#__PURE__*/_react.default.createElement("span", {
|
|
698
698
|
className: "".concat(selectPrefixCls, "-selection-search"),
|
|
699
699
|
style: {
|
|
700
700
|
width: inputWidth
|
|
@@ -712,7 +712,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
712
712
|
className: "".concat(selectPrefixCls, "-selection-search-mirror")
|
|
713
713
|
}, searchValue, "\xA0")), /*#__PURE__*/_react.default.createElement("span", {
|
|
714
714
|
className: "".concat(selectPrefixCls, "-placeholder")
|
|
715
|
-
}, !mulOptions.length && !searchValue
|
|
715
|
+
}, !mulOptions.length && !searchValue ? placeholder : null), /*#__PURE__*/_react.default.createElement("span", {
|
|
716
716
|
className: "".concat(selectPrefixCls, "-suffix")
|
|
717
717
|
}, renderSuffix()));
|
|
718
718
|
};
|