@kdcloudjs/kdesign 1.7.54 → 1.7.55
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/dist/kdesign-complete.less +0 -1
- package/dist/kdesign.css +1 -2
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +35 -9
- 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/city-picker/style/index.css +0 -1
- package/es/city-picker/style/index.less +0 -1
- package/es/grid/col.js +14 -3
- package/es/grid/row.js +14 -3
- package/es/input/ClearableLabeledInput.js +2 -2
- package/lib/city-picker/style/index.css +0 -1
- package/lib/city-picker/style/index.less +0 -1
- package/lib/grid/col.js +14 -3
- package/lib/grid/row.js +14 -3
- package/lib/input/ClearableLabeledInput.js +2 -2
- package/package.json +1 -1
package/es/grid/col.js
CHANGED
|
@@ -41,12 +41,23 @@ var Col = function Col(props) {
|
|
|
41
41
|
var rowGroup = useContext(GapContext);
|
|
42
42
|
var mergedWinWidth = rowGroup.winWidth;
|
|
43
43
|
var gap = rowGroup.gap;
|
|
44
|
-
//
|
|
45
|
-
var
|
|
44
|
+
// 判断当前浏览器是否支持row-gap,如果不支持则使用margin负值模拟
|
|
45
|
+
var notSupportRowGap = function notSupportRowGap() {
|
|
46
|
+
// 判断是否是搜狗浏览器
|
|
47
|
+
if (testBrowserType(/^sogou/i, 0)) return true;
|
|
48
|
+
// 判断是否是IE浏览器
|
|
49
|
+
if (/Trident|MSIE/.test(navigator.userAgent)) return true;
|
|
50
|
+
// 判断是否是chrome浏览器,chrome浏览器版本号小于69
|
|
51
|
+
if (/Chrome/.test(navigator.userAgent) && !/Chromium/.test(navigator.userAgent)) {
|
|
52
|
+
var version = navigator.userAgent.split('Chrome/')[1].split('.');
|
|
53
|
+
if (version[0] && parseInt(version[0]) <= 69) return true;
|
|
54
|
+
}
|
|
55
|
+
return false;
|
|
56
|
+
};
|
|
46
57
|
var colGapStyle = {
|
|
47
58
|
padding: "0 ".concat(gap.h / 2, "px")
|
|
48
59
|
};
|
|
49
|
-
if (
|
|
60
|
+
if (notSupportRowGap() && gap.v) colGapStyle.marginBottom = gap.v;
|
|
50
61
|
// className前缀
|
|
51
62
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'col', customPrefixcls);
|
|
52
63
|
var columns = 24;
|
package/es/grid/row.js
CHANGED
|
@@ -42,8 +42,19 @@ var Row = function Row(props) {
|
|
|
42
42
|
align = _getCompProps.align,
|
|
43
43
|
justify = _getCompProps.justify,
|
|
44
44
|
customPrefixcls = _getCompProps.prefixCls;
|
|
45
|
-
//
|
|
46
|
-
var
|
|
45
|
+
// 判断当前浏览器是否支持row-gap,如果不支持则使用margin负值模拟
|
|
46
|
+
var notSupportRowGap = function notSupportRowGap() {
|
|
47
|
+
// 判断是否是搜狗浏览器
|
|
48
|
+
if (testBrowserType(/^sogou/i, 0)) return true;
|
|
49
|
+
// 判断是否是IE浏览器
|
|
50
|
+
if (/Trident|MSIE/.test(navigator.userAgent)) return true;
|
|
51
|
+
// 判断是否是chrome浏览器,chrome浏览器版本号小于69
|
|
52
|
+
if (/Chrome/.test(navigator.userAgent) && !/Chromium/.test(navigator.userAgent)) {
|
|
53
|
+
var version = navigator.userAgent.split('Chrome/')[1].split('.');
|
|
54
|
+
if (version[0] && parseInt(version[0]) <= 69) return true;
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
};
|
|
47
58
|
// className前缀
|
|
48
59
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'row', customPrefixcls);
|
|
49
60
|
var _React$useState = React.useState(window.innerWidth),
|
|
@@ -78,7 +89,7 @@ var Row = function Row(props) {
|
|
|
78
89
|
rowGap: "".concat(gap.v, "px"),
|
|
79
90
|
margin: "0 ".concat(-1 * gap.h / 2, "px")
|
|
80
91
|
};
|
|
81
|
-
if (gap.v &&
|
|
92
|
+
if (gap.v && notSupportRowGap()) rowStyle.marginBottom = "".concat(-1 * gap.v, "px");
|
|
82
93
|
var toalign = {
|
|
83
94
|
top: 'flex-start',
|
|
84
95
|
middle: 'center',
|
|
@@ -56,11 +56,11 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
58
|
var needClear = !disabled && value && isMouseEnter;
|
|
59
|
-
var
|
|
59
|
+
var clearIconCls = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-textarea-clear-icon"), inputType === ClearableInputType[1]), _defineProperty(_classNames, "".concat(prefixCls, "-clear-icon"), inputType === ClearableInputType[0]), _defineProperty(_classNames, "".concat(prefixCls, "-clear-icon-hidden"), !needClear), _defineProperty(_classNames, "".concat(prefixCls, "-clear-icon-rightSpace"), suffix), _classNames));
|
|
60
60
|
return /*#__PURE__*/React.createElement("span", {
|
|
61
61
|
onMouseDown: mouseDownHandle,
|
|
62
62
|
onClick: handleReset,
|
|
63
|
-
className:
|
|
63
|
+
className: clearIconCls
|
|
64
64
|
}, typeof allowClear === 'boolean' ? /*#__PURE__*/React.createElement(Icon, {
|
|
65
65
|
type: "close-solid"
|
|
66
66
|
}) : allowClear);
|
package/lib/grid/col.js
CHANGED
|
@@ -53,12 +53,23 @@ var Col = function Col(props) {
|
|
|
53
53
|
var rowGroup = (0, _react.useContext)(_row.GapContext);
|
|
54
54
|
var mergedWinWidth = rowGroup.winWidth;
|
|
55
55
|
var gap = rowGroup.gap;
|
|
56
|
-
//
|
|
57
|
-
var
|
|
56
|
+
// 判断当前浏览器是否支持row-gap,如果不支持则使用margin负值模拟
|
|
57
|
+
var notSupportRowGap = function notSupportRowGap() {
|
|
58
|
+
// 判断是否是搜狗浏览器
|
|
59
|
+
if ((0, _testBrowserType.testBrowserType)(/^sogou/i, 0)) return true;
|
|
60
|
+
// 判断是否是IE浏览器
|
|
61
|
+
if (/Trident|MSIE/.test(navigator.userAgent)) return true;
|
|
62
|
+
// 判断是否是chrome浏览器,chrome浏览器版本号小于69
|
|
63
|
+
if (/Chrome/.test(navigator.userAgent) && !/Chromium/.test(navigator.userAgent)) {
|
|
64
|
+
var version = navigator.userAgent.split('Chrome/')[1].split('.');
|
|
65
|
+
if (version[0] && parseInt(version[0]) <= 69) return true;
|
|
66
|
+
}
|
|
67
|
+
return false;
|
|
68
|
+
};
|
|
58
69
|
var colGapStyle = {
|
|
59
70
|
padding: "0 ".concat(gap.h / 2, "px")
|
|
60
71
|
};
|
|
61
|
-
if (
|
|
72
|
+
if (notSupportRowGap() && gap.v) colGapStyle.marginBottom = gap.v;
|
|
62
73
|
// className前缀
|
|
63
74
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'col', customPrefixcls);
|
|
64
75
|
var columns = 24;
|
package/lib/grid/row.js
CHANGED
|
@@ -55,8 +55,19 @@ var Row = function Row(props) {
|
|
|
55
55
|
align = _getCompProps.align,
|
|
56
56
|
justify = _getCompProps.justify,
|
|
57
57
|
customPrefixcls = _getCompProps.prefixCls;
|
|
58
|
-
//
|
|
59
|
-
var
|
|
58
|
+
// 判断当前浏览器是否支持row-gap,如果不支持则使用margin负值模拟
|
|
59
|
+
var notSupportRowGap = function notSupportRowGap() {
|
|
60
|
+
// 判断是否是搜狗浏览器
|
|
61
|
+
if ((0, _testBrowserType.testBrowserType)(/^sogou/i, 0)) return true;
|
|
62
|
+
// 判断是否是IE浏览器
|
|
63
|
+
if (/Trident|MSIE/.test(navigator.userAgent)) return true;
|
|
64
|
+
// 判断是否是chrome浏览器,chrome浏览器版本号小于69
|
|
65
|
+
if (/Chrome/.test(navigator.userAgent) && !/Chromium/.test(navigator.userAgent)) {
|
|
66
|
+
var version = navigator.userAgent.split('Chrome/')[1].split('.');
|
|
67
|
+
if (version[0] && parseInt(version[0]) <= 69) return true;
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
};
|
|
60
71
|
// className前缀
|
|
61
72
|
var prefixCls = getPrefixCls(pkgPrefixCls, 'row', customPrefixcls);
|
|
62
73
|
var _React$useState = _react.default.useState(window.innerWidth),
|
|
@@ -91,7 +102,7 @@ var Row = function Row(props) {
|
|
|
91
102
|
rowGap: "".concat(gap.v, "px"),
|
|
92
103
|
margin: "0 ".concat(-1 * gap.h / 2, "px")
|
|
93
104
|
};
|
|
94
|
-
if (gap.v &&
|
|
105
|
+
if (gap.v && notSupportRowGap()) rowStyle.marginBottom = "".concat(-1 * gap.v, "px");
|
|
95
106
|
var toalign = {
|
|
96
107
|
top: 'flex-start',
|
|
97
108
|
middle: 'center',
|
|
@@ -69,11 +69,11 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
71
|
var needClear = !disabled && value && isMouseEnter;
|
|
72
|
-
var
|
|
72
|
+
var clearIconCls = (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-textarea-clear-icon"), inputType === ClearableInputType[1]), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-clear-icon"), inputType === ClearableInputType[0]), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-clear-icon-hidden"), !needClear), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-clear-icon-rightSpace"), suffix), _classNames));
|
|
73
73
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
74
74
|
onMouseDown: mouseDownHandle,
|
|
75
75
|
onClick: handleReset,
|
|
76
|
-
className:
|
|
76
|
+
className: clearIconCls
|
|
77
77
|
}, typeof allowClear === 'boolean' ? /*#__PURE__*/_react.default.createElement(_index.Icon, {
|
|
78
78
|
type: "close-solid"
|
|
79
79
|
}) : allowClear);
|