@para-ui/core 4.0.0-rc → 4.0.0-rc.1
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/AutoBox/index.d.ts +1 -1
- package/AutoBox/index.js +12 -12
- package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/AutoTips/index.d.ts +2 -2
- package/AutoTips/index.js +12 -12
- package/Badge/index.d.ts +23 -0
- package/Badge/index.js +54 -0
- package/Breadcrumbs/index.js +8 -8
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +3 -3
- package/Carousel/index.d.ts +6 -6
- package/Carousel/index.js +5 -5
- package/Cascader/Cascader.d.ts +10 -10
- package/Cascader/OptionList/Column.d.ts +3 -3
- package/Cascader/OptionList/index.d.ts +2 -2
- package/Cascader/index.d.ts +1 -1
- package/Cascader/index.js +4 -2
- package/Cascader/lang/en_US.d.ts +5 -0
- package/Cascader/lang/index.d.ts +11 -0
- package/Cascader/lang/zh_CN.d.ts +5 -0
- package/Cascader/utils/treeUtil.d.ts +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +4 -4
- package/CheckboxGroup/index.d.ts +2 -2
- package/CheckboxGroup/index.js +3 -3
- package/Collapse/index.js +4 -4
- package/CollapseBox/index.js +12 -20
- package/CollapseLayout/index.js +20 -20
- package/ColorPicker/index.js +2 -2
- package/ComboSelect/index.js +43 -52
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.d.ts +3 -3
- package/Container/index.js +56 -56
- package/CopyText/index.d.ts +2 -2
- package/DatePicker/generatePicker/index.d.ts +22 -22
- package/DatePicker/index.js +8 -7
- package/DatePicker/util.d.ts +1 -1
- package/Desktop/index.d.ts +1 -1
- package/Desktop/index.js +18 -13
- package/DragVerify/index.d.ts +1 -1
- package/DragVerify/index.js +13 -13
- package/Drawer/index.js +29 -33
- package/Drawer/interface.d.ts +2 -2
- package/Dropdown/index.d.ts +1 -1
- package/DynamicMultiBox/formItem.d.ts +1 -1
- package/DynamicMultiBox/index.d.ts +1 -1
- package/DynamicMultiBox/index.js +38 -35
- package/DynamicMultiBox/interface.d.ts +8 -8
- package/DynamicMultiBox/rowForm.d.ts +3 -1
- package/Empty/index.d.ts +1 -1
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +12 -13
- package/Form/index.js +10 -8
- package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
- package/FormItem/compoments/formFile/index.d.ts +2 -2
- package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/FormItem/compoments/formSelect/index.d.ts +7 -7
- package/FormItem/errorTips.d.ts +3 -3
- package/FormItem/index.d.ts +5 -5
- package/FormItem/index.js +3 -2
- package/FormItem/lang/en_US.d.ts +10 -0
- package/FormItem/lang/index.d.ts +21 -0
- package/FormItem/lang/zh_CN.d.ts +10 -0
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/dialog.d.ts +26 -26
- package/FunctionModal/index.d.ts +6 -6
- package/FunctionModal/index.js +6 -6
- package/FunctionModal/modalContext.d.ts +3 -3
- package/GlobalContext/componentsProps.d.ts +7 -7
- package/GlobalContext/index.d.ts +2 -2
- package/GlobalContext/useFormatMessage.d.ts +1 -1
- package/Help/index.js +1 -1
- package/HelperText/index.js +1 -1
- package/InputLang/index.d.ts +2 -2
- package/InputLang/index.js +8 -8
- package/InputNumber/index.d.ts +2 -2
- package/InputNumber/index.js +3 -3
- package/Label/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Menu/index.js +14 -14
- package/Menu/interface.d.ts +1 -1
- package/Message/index.js +12 -12
- package/Modal/Confirm/index.d.ts +3 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +5 -5
- package/MultiBox/index.d.ts +2 -2
- package/MultiBox/index.js +3 -3
- package/Notification/index.js +1 -1
- package/OperateBtn/index.d.ts +2 -2
- package/OperateBtn/index.js +40 -36
- package/PageHeader/index.js +30 -30
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.js +17 -17
- package/PasswordRules/index.js +7 -7
- package/PopConfirm/index.js +3 -3
- package/Progress/Line.d.ts +10 -10
- package/Progress/Steps.d.ts +2 -2
- package/Progress/index.d.ts +12 -12
- package/Progress/index.js +40 -40
- package/Progress/utils.d.ts +4 -4
- package/Querying/index.d.ts +1 -1
- package/Querying/index.js +2 -2
- package/README.md +3 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +4 -4
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +3 -3
- package/Search/index.js +1 -1
- package/Select/index.d.ts +3 -3
- package/Select/index.js +42 -42
- package/SelectInput/index.js +2 -2
- package/Selector/index.js +15 -15
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +4 -4
- package/SelectorPicker/index.js +9 -9
- package/SingleBox/index.d.ts +2 -2
- package/SingleBox/index.js +3 -3
- package/Slider/interface.d.ts +1 -1
- package/Status/index.d.ts +4 -4
- package/Status/index.js +4 -4
- package/Stepper/index.d.ts +5 -5
- package/Stepper/index.js +23 -23
- package/Switch/index.d.ts +7 -7
- package/Switch/index.js +23 -5
- package/Switch/lang/en_US.d.ts +4 -0
- package/Switch/lang/index.d.ts +9 -0
- package/Switch/lang/zh_CN.d.ts +4 -0
- package/Table/index.js +34 -34
- package/Table/interface.d.ts +4 -4
- package/Table/tableBodyElement/index.d.ts +1 -1
- package/Table/tableBodyInterface.d.ts +2 -2
- package/Table/tableContainer/index.d.ts +1 -1
- package/Table/tableElement/index.d.ts +1 -1
- package/Table/tableHeadElement/index.d.ts +1 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +6 -6
- package/Table/tdElement/index.d.ts +1 -1
- package/Table/thElement/index.d.ts +2 -2
- package/Table/trElement/index.d.ts +1 -1
- package/Table/util.d.ts +1 -1
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +25 -17
- package/Tag/TagGroup.d.ts +5 -5
- package/Tag/index.d.ts +7 -7
- package/Tag/index.js +25 -25
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +45 -27
- package/TextEditor/lang/en_US.d.ts +4 -0
- package/TextEditor/lang/index.d.ts +9 -0
- package/TextEditor/lang/zh_CN.d.ts +4 -0
- package/TextField/index.d.ts +1 -1
- package/TextField/index.js +13 -13
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +1 -1
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +14 -14
- package/Title/index.d.ts +4 -4
- package/Title/index.js +3 -3
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.d.ts +5 -1
- package/ToggleButton/index.js +17 -10
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.js +21 -21
- package/Tree/OperateBar/index.d.ts +4 -4
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +2 -2
- package/Tree/interface.d.ts +4 -4
- package/Tree/utils/tools.d.ts +1 -1
- package/Upload/Dragger/index.d.ts +2 -2
- package/Upload/ErroTip/index.d.ts +1 -1
- package/Upload/index.d.ts +2 -2
- package/Upload/index.js +7 -7
- package/Upload/interface.d.ts +1 -1
- package/_verture/{index-8469865e.js → index-0f315bca.js} +2 -2
- package/_verture/{index-e1b800aa.js → index-92e406f4.js} +48 -24
- package/_verture/{index-47297a40.js → index-bc461491.js} +45 -45
- package/_verture/{index-1c8d3e94.js → index-d251967e.js} +101 -47
- package/_verture/{modalContext-670eab09.js → modalContext-9299acc9.js} +25 -25
- package/index.d.ts +2 -0
- package/index.js +8 -7
- package/locale/en-US.d.ts +19 -0
- package/locale/index.d.ts +38 -0
- package/locale/index.js +39 -1
- package/locale/zh-CN.d.ts +19 -0
- package/package.json +3 -1
- package/umd/AutoBox.js +1 -1
- package/umd/AutoTips.js +1 -1
- package/umd/Badge.js +1 -0
- package/umd/Breadcrumbs.js +1 -1
- package/umd/Button.js +2 -2
- package/umd/ButtonGroup.js +2 -2
- package/umd/Cascader.js +5 -5
- package/umd/Checkbox.js +1 -1
- package/umd/CheckboxGroup.js +1 -1
- package/umd/Collapse.js +1 -1
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ComboSelect.js +4 -4
- package/umd/CopyText.js +1 -1
- package/umd/DatePicker.js +2 -2
- package/umd/Desktop.js +2 -2
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +2 -2
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +2 -2
- package/umd/Help.js +1 -1
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +1 -1
- package/umd/InputNumber.js +1 -1
- package/umd/Label.js +1 -1
- package/umd/Loading.js +1 -1
- package/umd/Menu.js +2 -2
- package/umd/Message.js +1 -1
- package/umd/Modal.js +2 -2
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +1 -1
- package/umd/OperateBtn.js +2 -2
- package/umd/PageHeader.js +2 -2
- package/umd/Pagination.js +4 -4
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +2 -2
- package/umd/Progress.js +1 -1
- package/umd/Radio.js +1 -1
- package/umd/RadioGroup.js +1 -1
- package/umd/Search.js +7 -7
- package/umd/Select.js +1 -1
- package/umd/SelectInput.js +1 -1
- package/umd/Selector.js +1 -1
- package/umd/SelectorPicker.js +1 -1
- package/umd/SingleBox.js +1 -1
- package/umd/Stepper.js +1 -1
- package/umd/Switch.js +4 -4
- package/umd/Table.js +2 -2
- package/umd/Tabs.js +4 -4
- package/umd/Tag.js +1 -1
- package/umd/TextEditor.js +2 -2
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +1 -1
- package/umd/ToggleButton.js +4 -4
- package/umd/Transfer.js +2 -2
- package/umd/Tree.js +1 -1
- package/umd/Upload.js +2 -2
- package/umd/locale.js +1 -1
package/Progress/index.js
CHANGED
|
@@ -18,11 +18,11 @@ var Steps = function Steps(props) {
|
|
|
18
18
|
trailColor = props.trailColor,
|
|
19
19
|
children = props.children;
|
|
20
20
|
/** 计算出应该高亮多少步 **/
|
|
21
|
-
var current = typeof percent ===
|
|
21
|
+
var current = typeof percent === 'number' ? Math.round(steps * (percent / 100)) : 1;
|
|
22
22
|
var styledSteps = [];
|
|
23
23
|
for (var i = 0; i < steps; i += 1) {
|
|
24
24
|
styledSteps.push(jsx("div", {
|
|
25
|
-
className: i <= current - 1 ?
|
|
25
|
+
className: i <= current - 1 ? 'steps-item steps-item-active' : 'steps-item',
|
|
26
26
|
style: {
|
|
27
27
|
backgroundColor: i <= current - 1 ? strokeColor : trailColor,
|
|
28
28
|
width: 14,
|
|
@@ -38,10 +38,10 @@ var Steps = function Steps(props) {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* 判断进度条传的百分比参数是否规范
|
|
42
|
-
* @param {number | undefined} progress 方法入参说明
|
|
43
|
-
* @return {numner} 百分比值
|
|
44
|
-
*/
|
|
41
|
+
* 判断进度条传的百分比参数是否规范
|
|
42
|
+
* @param {number | undefined} progress 方法入参说明
|
|
43
|
+
* @return {numner} 百分比值
|
|
44
|
+
*/
|
|
45
45
|
function validProgress(progress) {
|
|
46
46
|
if (!progress || progress < 0) {
|
|
47
47
|
return 0;
|
|
@@ -53,7 +53,7 @@ function validProgress(progress) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* 转换 百分比 到 样式格式
|
|
56
|
+
* 转换 百分比 到 样式格式
|
|
57
57
|
* {
|
|
58
58
|
* "0%": "#afc163",
|
|
59
59
|
* "75%": "#009900",
|
|
@@ -61,14 +61,14 @@ function validProgress(progress) {
|
|
|
61
61
|
* "25%": "#66FF00",
|
|
62
62
|
* "100%": "#ffffff"
|
|
63
63
|
* }
|
|
64
|
-
* @param gradients 渐变的参数
|
|
65
|
-
* @return {string} 样式值
|
|
66
|
-
*/
|
|
64
|
+
* @param gradients 渐变的参数
|
|
65
|
+
* @return {string} 样式值
|
|
66
|
+
*/
|
|
67
67
|
var sortGradient = function sortGradient(gradients) {
|
|
68
68
|
var tempArr = [];
|
|
69
69
|
Object.keys(gradients).forEach(function (key) {
|
|
70
70
|
// 拿到百分比的数字
|
|
71
|
-
var formattedKey = parseFloat(key.replace(/%/g,
|
|
71
|
+
var formattedKey = parseFloat(key.replace(/%/g, ''));
|
|
72
72
|
// 进行序列化
|
|
73
73
|
if (!isNaN(formattedKey)) {
|
|
74
74
|
tempArr.push({
|
|
@@ -85,10 +85,10 @@ var sortGradient = function sortGradient(gradients) {
|
|
|
85
85
|
var key = _ref.key,
|
|
86
86
|
value = _ref.value;
|
|
87
87
|
return "".concat(value, " ").concat(key, "%");
|
|
88
|
-
}).join(
|
|
88
|
+
}).join(', ');
|
|
89
89
|
};
|
|
90
90
|
/**
|
|
91
|
-
* 转换传进来 渐变的参数 为css样式
|
|
91
|
+
* 转换传进来 渐变的参数 为css样式
|
|
92
92
|
* {
|
|
93
93
|
* "0%": "#afc163",
|
|
94
94
|
* "25%": "#66FF00",
|
|
@@ -102,16 +102,16 @@ var sortGradient = function sortGradient(gradients) {
|
|
|
102
102
|
* "to": "#66FF00",// ====> linear-gradient(to right, #afc163, #66FF00)
|
|
103
103
|
* }
|
|
104
104
|
*
|
|
105
|
-
* @param {string} strokeColor 颜色值
|
|
106
|
-
* @return 返回 backgroundImage 的样式值
|
|
107
|
-
*/
|
|
105
|
+
* @param {string} strokeColor 颜色值
|
|
106
|
+
* @return 返回 backgroundImage 的样式值
|
|
107
|
+
*/
|
|
108
108
|
var handleGradient = function handleGradient(strokeColor, directionConfig) {
|
|
109
109
|
var _strokeColor$from = strokeColor.from,
|
|
110
|
-
from = _strokeColor$from === void 0 ?
|
|
110
|
+
from = _strokeColor$from === void 0 ? '#3D66F8' : _strokeColor$from,
|
|
111
111
|
_strokeColor$to = strokeColor.to,
|
|
112
|
-
to = _strokeColor$to === void 0 ?
|
|
112
|
+
to = _strokeColor$to === void 0 ? '#4F93F0' : _strokeColor$to,
|
|
113
113
|
_strokeColor$directio = strokeColor.direction,
|
|
114
|
-
direction = _strokeColor$directio === void 0 ? directionConfig ===
|
|
114
|
+
direction = _strokeColor$directio === void 0 ? directionConfig === 'rtl' ? 'to left' : 'to right' : _strokeColor$directio,
|
|
115
115
|
rest = __rest(strokeColor, ["from", "to", "direction"]);
|
|
116
116
|
// 剩余参数有值说明除了from to direction 还传了 另外的参数
|
|
117
117
|
if (Object.keys(rest).length !== 0) {
|
|
@@ -132,7 +132,7 @@ var Line = function Line(props) {
|
|
|
132
132
|
strokeLinecap = props.strokeLinecap,
|
|
133
133
|
trailColor = props.trailColor;
|
|
134
134
|
/** 进度条高亮部分的颜色样式 **/
|
|
135
|
-
var backgroundProps = strokeColor && typeof strokeColor !==
|
|
135
|
+
var backgroundProps = strokeColor && typeof strokeColor !== 'string' ? handleGradient(strokeColor, directionConfig) : {
|
|
136
136
|
background: strokeColor
|
|
137
137
|
};
|
|
138
138
|
/** 进度条轨道部分的颜色样式 **/
|
|
@@ -143,7 +143,7 @@ var Line = function Line(props) {
|
|
|
143
143
|
var percentStyle = Object.assign({
|
|
144
144
|
width: "".concat(validProgress(percent), "%"),
|
|
145
145
|
height: strokeWidth || 8,
|
|
146
|
-
borderRadius: strokeLinecap ===
|
|
146
|
+
borderRadius: strokeLinecap === 'square' ? 0 : ''
|
|
147
147
|
}, backgroundProps);
|
|
148
148
|
return jsx("div", Object.assign({
|
|
149
149
|
className: "trail-bar",
|
|
@@ -176,14 +176,14 @@ var ProgressStatuses;
|
|
|
176
176
|
})(ProgressStatuses || (ProgressStatuses = {}));
|
|
177
177
|
/** 每个类型对应的进度条默认颜色 **/
|
|
178
178
|
var strokeColorMap = {
|
|
179
|
-
success:
|
|
180
|
-
exception:
|
|
181
|
-
normal:
|
|
182
|
-
active:
|
|
179
|
+
success: 'rgba(19, 191, 76, 1)',
|
|
180
|
+
exception: 'rgba(244, 66, 66, 1)',
|
|
181
|
+
normal: 'rgba(46, 101, 230, 1)',
|
|
182
|
+
active: 'rgba(46, 101, 230, 1)'
|
|
183
183
|
};
|
|
184
184
|
var Progress = function Progress(props) {
|
|
185
185
|
var _props$type = props.type,
|
|
186
|
-
type = _props$type === void 0 ?
|
|
186
|
+
type = _props$type === void 0 ? 'line' : _props$type,
|
|
187
187
|
className = props.className,
|
|
188
188
|
style = props.style;
|
|
189
189
|
props.children;
|
|
@@ -207,14 +207,14 @@ var Progress = function Progress(props) {
|
|
|
207
207
|
* @return {string}
|
|
208
208
|
*/
|
|
209
209
|
var classString = function classString() {
|
|
210
|
-
var str = "".concat($prefixCls, "-progress ").concat($prefixCls, "-progress-").concat(type ||
|
|
210
|
+
var str = "".concat($prefixCls, "-progress ").concat($prefixCls, "-progress-").concat(type || 'default');
|
|
211
211
|
// 添加成功状态的class
|
|
212
212
|
if (isSuccessStatus) str += " ".concat($prefixCls, "-progress-success-status");
|
|
213
213
|
// 添加错误状态下的class
|
|
214
|
-
if (status ===
|
|
214
|
+
if (status === 'exception') str += " ".concat($prefixCls, "-progress-exception-status");
|
|
215
215
|
// 添加active状态下的class
|
|
216
|
-
if (status ===
|
|
217
|
-
if (className) str += " "
|
|
216
|
+
if (status === 'active') str += " ".concat($prefixCls, "-progress-active-status");
|
|
217
|
+
if (className) str += " ".concat(className);
|
|
218
218
|
return str;
|
|
219
219
|
};
|
|
220
220
|
/**
|
|
@@ -225,24 +225,24 @@ var Progress = function Progress(props) {
|
|
|
225
225
|
// 如果传了成功进度条的配置
|
|
226
226
|
if (strokeColor) return strokeColor;
|
|
227
227
|
if (success && success.percent < percent) {
|
|
228
|
-
return [success.strokeColor || strokeColorMap[
|
|
228
|
+
return [success.strokeColor || strokeColorMap['success'], strokeColorMap['normal']];
|
|
229
229
|
}
|
|
230
|
-
return isSuccessStatus ? strokeColorMap[
|
|
230
|
+
return isSuccessStatus ? strokeColorMap['success'] : strokeColorMap[status || 'normal'];
|
|
231
231
|
};
|
|
232
232
|
/**
|
|
233
233
|
* 处理进度条的值
|
|
234
234
|
* @return {string}
|
|
235
235
|
*/
|
|
236
236
|
var renderPercent = function renderPercent() {
|
|
237
|
-
if (success && success.percent < percent && typeof percent ===
|
|
237
|
+
if (success && success.percent < percent && typeof percent === 'number') {
|
|
238
238
|
return [success.percent, percent - success.percent];
|
|
239
239
|
}
|
|
240
240
|
return percent;
|
|
241
241
|
};
|
|
242
242
|
/** 标记是不是成功状态 **/
|
|
243
|
-
var isSuccessStatus = percent && percent === 100 && !status || status ===
|
|
243
|
+
var isSuccessStatus = percent && percent === 100 && !status || status === 'success';
|
|
244
244
|
/** style值 **/
|
|
245
|
-
var renderStyle = type ===
|
|
245
|
+
var renderStyle = type === 'circle' || type === 'dashboard' ? {
|
|
246
246
|
width: width,
|
|
247
247
|
height: width
|
|
248
248
|
} : {};
|
|
@@ -252,17 +252,17 @@ var Progress = function Progress(props) {
|
|
|
252
252
|
*/
|
|
253
253
|
var renderLabel = function renderLabel() {
|
|
254
254
|
if (format) return format(percent);
|
|
255
|
-
if (isSuccessStatus) return type ===
|
|
255
|
+
if (isSuccessStatus) return type === 'circle' ? jsx(Check, {
|
|
256
256
|
className: "success"
|
|
257
257
|
}) : jsx(CompleteIcon, {
|
|
258
258
|
className: "success"
|
|
259
259
|
});
|
|
260
|
-
if (status ===
|
|
260
|
+
if (status === 'exception') return type === 'circle' ? jsx(CloseIcon, {
|
|
261
261
|
className: "error"
|
|
262
262
|
}) : jsx(CloseCircleF, {
|
|
263
263
|
className: "error"
|
|
264
264
|
});
|
|
265
|
-
return validProgress(percent)
|
|
265
|
+
return "".concat(validProgress(percent), "%");
|
|
266
266
|
};
|
|
267
267
|
/** 默认进度条 **/
|
|
268
268
|
var renderLineProgress = steps ? jsx(Steps, Object.assign({
|
|
@@ -280,7 +280,7 @@ var Progress = function Progress(props) {
|
|
|
280
280
|
percent: renderPercent(),
|
|
281
281
|
direction: direction
|
|
282
282
|
}, otherProps, {
|
|
283
|
-
children:
|
|
283
|
+
children: ' '
|
|
284
284
|
}));
|
|
285
285
|
/** 圆形进度条 **/
|
|
286
286
|
var renderCircleProgress = jsx(Circle, Object.assign({
|
|
@@ -311,7 +311,7 @@ var Progress = function Progress(props) {
|
|
|
311
311
|
className: "progress-inner",
|
|
312
312
|
style: renderStyle
|
|
313
313
|
}, {
|
|
314
|
-
children: type ===
|
|
314
|
+
children: type === 'dashboard' ? renderDashboardProgress : type === 'circle' ? renderCircleProgress : renderLineProgress
|
|
315
315
|
})), showInfo && !steps && jsx("div", Object.assign({
|
|
316
316
|
className: "progress-text"
|
|
317
317
|
}, {
|
package/Progress/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 判断进度条传的百分比参数是否规范
|
|
3
|
-
* @param {number | undefined} progress 方法入参说明
|
|
4
|
-
* @return {numner} 百分比值
|
|
5
|
-
*/
|
|
2
|
+
* 判断进度条传的百分比参数是否规范
|
|
3
|
+
* @param {number | undefined} progress 方法入参说明
|
|
4
|
+
* @return {numner} 百分比值
|
|
5
|
+
*/
|
|
6
6
|
export declare function validProgress(progress: number | number[] | undefined): number | number[];
|
package/Querying/index.d.ts
CHANGED
package/Querying/index.js
CHANGED
|
@@ -709,8 +709,8 @@ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/2 上
|
|
|
709
709
|
styleInject(css_248z);
|
|
710
710
|
|
|
711
711
|
var imageMap = {
|
|
712
|
-
|
|
713
|
-
|
|
712
|
+
large: jsx(LargeSearch, {}),
|
|
713
|
+
small: jsx(SmallSearch, {})
|
|
714
714
|
};
|
|
715
715
|
//Querying 查询中
|
|
716
716
|
var Querying = function Querying(props) {
|
package/README.md
CHANGED
|
@@ -26,6 +26,9 @@
|
|
|
26
26
|
【通知提示框-Notification】支持移除closeIcon
|
|
27
27
|
|
|
28
28
|
【linhd】
|
|
29
|
+
【动态多值框-DynamicMultiBox】没有拖拽,valueList不生成chosen,selected字段
|
|
30
|
+
【动态多值框-DynamicMultiBox】增加labelProps参数,用来修改标题
|
|
31
|
+
【动态多值框-DynamicMultiBox】增加rowKey,用来自定义每行的唯一id
|
|
29
32
|
【输入框-TextField】修复输入框存在焦点,点击输入框,触发onBlur事件
|
|
30
33
|
【下拉框-Select】去除searchModel为inside,自动得到焦点,防止页面上下抖动
|
|
31
34
|
【下拉框-Select】修复下拉框闪烁渲染
|
package/Radio/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { LabelTooltipProps } from '../Label';
|
|
8
|
-
import { TooltipProps } from
|
|
8
|
+
import { TooltipProps } from '../Tooltip';
|
|
9
9
|
import './index.scss';
|
|
10
10
|
export interface RadioProps {
|
|
11
11
|
/** 样式class */
|
package/Radio/index.js
CHANGED
|
@@ -52,8 +52,8 @@ var Radio = function Radio(props) {
|
|
|
52
52
|
};
|
|
53
53
|
// 处理className
|
|
54
54
|
var handClass = function handClass() {
|
|
55
|
-
var str = $prefixCls
|
|
56
|
-
if (className) str +=
|
|
55
|
+
var str = "".concat($prefixCls, "-radio");
|
|
56
|
+
if (className) str += " ".concat(className);
|
|
57
57
|
if (size) str += " ".concat($prefixCls, "-radio-").concat(size);
|
|
58
58
|
if (disabled) str += " ".concat($prefixCls, "-radio-disabled");
|
|
59
59
|
if (checkedCom) str += " ".concat($prefixCls, "-radio-checked");
|
|
@@ -62,7 +62,7 @@ var Radio = function Radio(props) {
|
|
|
62
62
|
var handLabelClass = function handLabelClass() {
|
|
63
63
|
var str = 'radio-label';
|
|
64
64
|
if (labelTooltip && labelTooltip.className) {
|
|
65
|
-
str +=
|
|
65
|
+
str += " ".concat(labelTooltip.className);
|
|
66
66
|
}
|
|
67
67
|
return str;
|
|
68
68
|
};
|
|
@@ -70,7 +70,7 @@ var Radio = function Radio(props) {
|
|
|
70
70
|
var handHelpClassName = function handHelpClassName() {
|
|
71
71
|
var str = ' radio-help';
|
|
72
72
|
if (labelTooltip && labelTooltip.helpClassName) {
|
|
73
|
-
str +=
|
|
73
|
+
str += " ".concat(labelTooltip.helpClassName);
|
|
74
74
|
}
|
|
75
75
|
return str;
|
|
76
76
|
};
|
package/RadioGroup/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { RadioProps } from '../Radio';
|
|
8
|
-
import { LabelTooltipProps } from
|
|
9
|
-
import { HelperTextDetailProps } from
|
|
8
|
+
import { LabelTooltipProps } from '../Label';
|
|
9
|
+
import { HelperTextDetailProps } from '../HelperText';
|
|
10
10
|
import './index.scss';
|
|
11
11
|
export interface RadioListProps extends RadioProps {
|
|
12
12
|
[name: string]: any;
|
package/RadioGroup/index.js
CHANGED
|
@@ -73,7 +73,7 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
73
73
|
var handLabelClass = function handLabelClass() {
|
|
74
74
|
var str = 'radio-group-label';
|
|
75
75
|
if (labelTooltip && labelTooltip.className) {
|
|
76
|
-
str +=
|
|
76
|
+
str += " ".concat(labelTooltip.className);
|
|
77
77
|
}
|
|
78
78
|
return str;
|
|
79
79
|
};
|
|
@@ -102,8 +102,8 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
102
102
|
};
|
|
103
103
|
// 处理class
|
|
104
104
|
var handClass = function handClass() {
|
|
105
|
-
var str = $prefixCls
|
|
106
|
-
if (className) str +=
|
|
105
|
+
var str = "".concat($prefixCls, "-radio-group");
|
|
106
|
+
if (className) str += " ".concat(className);
|
|
107
107
|
if (size) str += " ".concat($prefixCls, "-radio-group-size");
|
|
108
108
|
if (error) str += " ".concat($prefixCls, "-radio-group-error");
|
|
109
109
|
if (disabled) str += " ".concat($prefixCls, "-radio-group-disabled");
|
package/Search/index.js
CHANGED
|
@@ -107,7 +107,7 @@ var Search = function Search(props) {
|
|
|
107
107
|
*/
|
|
108
108
|
var handClass = function handClass() {
|
|
109
109
|
var str = "".concat($prefixCls, "-search");
|
|
110
|
-
if (className) str +=
|
|
110
|
+
if (className) str += " ".concat(className);
|
|
111
111
|
if (size) str += " ".concat($prefixCls, "-search-").concat(size);
|
|
112
112
|
if (radius) str += " ".concat($prefixCls, "-search-radius");
|
|
113
113
|
return str;
|
package/Select/index.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* @description 下拉框
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import { EmptyProps } from
|
|
8
|
-
import { LabelTooltipProps } from
|
|
7
|
+
import { EmptyProps } from '../Empty';
|
|
8
|
+
import { LabelTooltipProps } from '../Label';
|
|
9
9
|
import { TooltipProps } from '../Tooltip';
|
|
10
|
-
import { HelperTextDetailProps } from
|
|
10
|
+
import { HelperTextDetailProps } from '../HelperText';
|
|
11
11
|
import './index.scss';
|
|
12
12
|
export interface SelectProps extends HelperTextDetailProps {
|
|
13
13
|
/** 样式class */
|
package/Select/index.js
CHANGED
|
@@ -61,21 +61,21 @@ styleInject(css_248z);
|
|
|
61
61
|
* @param text 文本
|
|
62
62
|
*/
|
|
63
63
|
var textSize = function textSize(fontSize, fontFamily, text) {
|
|
64
|
-
var span = document.createElement(
|
|
64
|
+
var span = document.createElement('span');
|
|
65
65
|
span.id = 'referenceSpan';
|
|
66
66
|
var result = {};
|
|
67
67
|
result.width = span.offsetWidth;
|
|
68
68
|
result.height = span.offsetHeight;
|
|
69
|
-
span.style.visibility =
|
|
69
|
+
span.style.visibility = 'hidden';
|
|
70
70
|
span.style.fontSize = fontSize;
|
|
71
71
|
span.style.fontFamily = fontFamily;
|
|
72
|
-
span.style.display =
|
|
73
|
-
var isExists = document.getElementById(
|
|
72
|
+
span.style.display = 'inline-block';
|
|
73
|
+
var isExists = document.getElementById('referenceSpan');
|
|
74
74
|
if (isExists) {
|
|
75
75
|
document.body.removeChild(isExists);
|
|
76
76
|
}
|
|
77
77
|
document.body.appendChild(span);
|
|
78
|
-
if (typeof span.textContent
|
|
78
|
+
if (typeof span.textContent !== 'undefined') {
|
|
79
79
|
span.textContent = text;
|
|
80
80
|
} else {
|
|
81
81
|
span.innerText = text;
|
|
@@ -146,10 +146,10 @@ var Select = function Select(props) {
|
|
|
146
146
|
_useGlobalProps$selec = _useGlobalProps.selectCheckIcon,
|
|
147
147
|
selectCheckIcon = _useGlobalProps$selec === void 0 ? true : _useGlobalProps$selec;
|
|
148
148
|
var posDom = useRef(null);
|
|
149
|
-
var _useState = useState($prefixCls
|
|
149
|
+
var _useState = useState("".concat($prefixCls, "-select-").concat(UUID())),
|
|
150
150
|
_useState2 = _slicedToArray(_useState, 1),
|
|
151
151
|
classOne = _useState2[0]; // 唯一class
|
|
152
|
-
var _useState3 = useState(
|
|
152
|
+
var _useState3 = useState("select-popover-".concat(UUID())),
|
|
153
153
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
154
154
|
classOneSelect = _useState4[0]; // 唯一class
|
|
155
155
|
var _useState5 = useState(false),
|
|
@@ -272,13 +272,13 @@ var Select = function Select(props) {
|
|
|
272
272
|
useEffect(function () {
|
|
273
273
|
// 多行不换行计算
|
|
274
274
|
if (!overLineCom && multiple) {
|
|
275
|
-
window.addEventListener(
|
|
275
|
+
window.addEventListener('resize', changeSize);
|
|
276
276
|
} else {
|
|
277
277
|
//setMorePos(constData.valueCom.length)
|
|
278
|
-
window.removeEventListener(
|
|
278
|
+
window.removeEventListener('resize', changeSize);
|
|
279
279
|
}
|
|
280
280
|
return function () {
|
|
281
|
-
window.removeEventListener(
|
|
281
|
+
window.removeEventListener('resize', changeSize);
|
|
282
282
|
};
|
|
283
283
|
}, [overLineCom, multiple]);
|
|
284
284
|
// 计算是否显示label,placehold
|
|
@@ -297,7 +297,7 @@ var Select = function Select(props) {
|
|
|
297
297
|
if (!open) return;
|
|
298
298
|
setLoading(true);
|
|
299
299
|
if (props.fetchSuggestions) {
|
|
300
|
-
props.fetchSuggestions
|
|
300
|
+
props.fetchSuggestions(searchValue, function (data) {
|
|
301
301
|
var listHand = handList(data);
|
|
302
302
|
handSelectList(listHand, true);
|
|
303
303
|
setLoading(false);
|
|
@@ -313,18 +313,18 @@ var Select = function Select(props) {
|
|
|
313
313
|
clearTimeout(constData.openTimer);
|
|
314
314
|
constData.openTimer = setTimeout(function () {
|
|
315
315
|
inputFocus();
|
|
316
|
-
window.addEventListener(
|
|
317
|
-
window.addEventListener(
|
|
316
|
+
window.addEventListener('click', clickCom);
|
|
317
|
+
window.addEventListener('keydown', keydownCom);
|
|
318
318
|
});
|
|
319
319
|
} else {
|
|
320
320
|
setSearchValue('');
|
|
321
|
-
window.removeEventListener(
|
|
322
|
-
window.removeEventListener(
|
|
321
|
+
window.removeEventListener('click', clickCom);
|
|
322
|
+
window.removeEventListener('keydown', keydownCom);
|
|
323
323
|
}
|
|
324
324
|
return function () {
|
|
325
325
|
clearTimeout(constData.openTimer);
|
|
326
|
-
window.removeEventListener(
|
|
327
|
-
window.removeEventListener(
|
|
326
|
+
window.removeEventListener('click', clickCom);
|
|
327
|
+
window.removeEventListener('keydown', keydownCom);
|
|
328
328
|
};
|
|
329
329
|
}, [open]);
|
|
330
330
|
// 是否计算搜索框长度
|
|
@@ -339,7 +339,7 @@ var Select = function Select(props) {
|
|
|
339
339
|
var handMultiline = function handMultiline(index) {
|
|
340
340
|
if (index === null || index === 0) return;
|
|
341
341
|
if (index === undefined) index = constData.valueCom.length;
|
|
342
|
-
var boxDom = document.querySelector(
|
|
342
|
+
var boxDom = document.querySelector(".".concat(classOne, " > .select-content > .check-select-content"));
|
|
343
343
|
if (!boxDom) return;
|
|
344
344
|
if (boxDom.scrollHeight > boxDom.clientHeight) {
|
|
345
345
|
var num = Number(index) - 1;
|
|
@@ -422,7 +422,7 @@ var Select = function Select(props) {
|
|
|
422
422
|
// 输入框的到焦点
|
|
423
423
|
var inputFocus = function inputFocus() {
|
|
424
424
|
var inputDom = textDom && textDom.current;
|
|
425
|
-
if (constData.searchModel ===
|
|
425
|
+
if (constData.searchModel === 'inside') return;
|
|
426
426
|
inputDom && inputDom.focus({
|
|
427
427
|
preventScroll: true
|
|
428
428
|
});
|
|
@@ -447,7 +447,7 @@ var Select = function Select(props) {
|
|
|
447
447
|
* @param e 当前点击元素
|
|
448
448
|
*/
|
|
449
449
|
var clickCom = function clickCom(e) {
|
|
450
|
-
var bol = closest(e.target,
|
|
450
|
+
var bol = closest(e.target, ".".concat(classOneSelect)); // 是否存在下拉当中
|
|
451
451
|
if (!bol) setOpen(false);
|
|
452
452
|
};
|
|
453
453
|
/**
|
|
@@ -541,8 +541,8 @@ var Select = function Select(props) {
|
|
|
541
541
|
// 处理下拉框class
|
|
542
542
|
var handClass = function handClass() {
|
|
543
543
|
var str = "".concat($prefixCls, "-select");
|
|
544
|
-
if (multiple && !overLineCom) str +=
|
|
545
|
-
if (className) str +=
|
|
544
|
+
if (multiple && !overLineCom) str += " ".concat(classOne); // 多选 超出不换行
|
|
545
|
+
if (className) str += " ".concat(className);
|
|
546
546
|
if (size) str += " ".concat($prefixCls, "-select-").concat(size);
|
|
547
547
|
if (error) str += " ".concat($prefixCls, "-select-error");
|
|
548
548
|
if (disabled === true) str += " ".concat($prefixCls, "-select-disabled");
|
|
@@ -563,14 +563,14 @@ var Select = function Select(props) {
|
|
|
563
563
|
} else {
|
|
564
564
|
str += " ".concat($prefixCls, "-select-popover-radio");
|
|
565
565
|
}
|
|
566
|
-
if (selectPopoverClassName) str +=
|
|
566
|
+
if (selectPopoverClassName) str += " ".concat(selectPopoverClassName);
|
|
567
567
|
return str;
|
|
568
568
|
};
|
|
569
569
|
// 处理下拉框更多class
|
|
570
570
|
var handleClassMorePopover = function handleClassMorePopover() {
|
|
571
571
|
var str = "".concat($prefixCls, "-select-more-popover ").concat($prefixCls, "-scrollbar-small");
|
|
572
572
|
if (size) str += " ".concat($prefixCls, "-select-more-popover-").concat(size);
|
|
573
|
-
if (morePopoverClassName) str +=
|
|
573
|
+
if (morePopoverClassName) str += " ".concat(morePopoverClassName);
|
|
574
574
|
return str;
|
|
575
575
|
};
|
|
576
576
|
/**
|
|
@@ -588,7 +588,7 @@ var Select = function Select(props) {
|
|
|
588
588
|
var onKeyDownSearch = function onKeyDownSearch(e) {
|
|
589
589
|
if (e.keyCode === 13) {
|
|
590
590
|
onEnterInput && onEnterInput(searchValue);
|
|
591
|
-
var selectDom = document.querySelector(
|
|
591
|
+
var selectDom = document.querySelector(".".concat(classOneSelect, " .select-popover-list"));
|
|
592
592
|
if (selectDom) {
|
|
593
593
|
var hoverDom = selectDom.querySelector('.select-popover-list-item-hover');
|
|
594
594
|
var keydownDom = selectDom.querySelector('.select-popover-list-item-keydown');
|
|
@@ -622,7 +622,7 @@ var Select = function Select(props) {
|
|
|
622
622
|
var results = textSize(fontSize, fontFamily, text);
|
|
623
623
|
var width = results.width;
|
|
624
624
|
if (width < 10) width = 10;
|
|
625
|
-
inputDom.style.width = width
|
|
625
|
+
inputDom.style.width = "".concat(width, "px");
|
|
626
626
|
};
|
|
627
627
|
/**
|
|
628
628
|
* 处理键盘事件 上/下
|
|
@@ -677,11 +677,11 @@ var Select = function Select(props) {
|
|
|
677
677
|
if (brotherDom.className.indexOf('select-popover-list-group') !== -1) {
|
|
678
678
|
var currentDom = brotherDom.querySelector(classGroupStr);
|
|
679
679
|
if (currentDom) {
|
|
680
|
-
currentDom.classList.add(
|
|
680
|
+
currentDom.classList.add('select-popover-list-item-keydown');
|
|
681
681
|
domClientTop(currentDom, selectDom);
|
|
682
682
|
}
|
|
683
683
|
} else {
|
|
684
|
-
brotherDom.classList.add(
|
|
684
|
+
brotherDom.classList.add('select-popover-list-item-keydown');
|
|
685
685
|
domClientTop(brotherDom, selectDom);
|
|
686
686
|
}
|
|
687
687
|
}
|
|
@@ -712,7 +712,7 @@ var Select = function Select(props) {
|
|
|
712
712
|
* @param e 键盘信息
|
|
713
713
|
*/
|
|
714
714
|
var keydownCom = function keydownCom(e) {
|
|
715
|
-
var selectDom = document.querySelector(
|
|
715
|
+
var selectDom = document.querySelector(".".concat(classOneSelect, " .select-popover-list"));
|
|
716
716
|
if (!selectDom) return;
|
|
717
717
|
var selectItemDom = selectDom.querySelector('.select-popover-list-item-select');
|
|
718
718
|
var hoverDom = selectDom.querySelector('.select-popover-list-item-hover');
|
|
@@ -733,7 +733,7 @@ var Select = function Select(props) {
|
|
|
733
733
|
}
|
|
734
734
|
if (keydownDom) {
|
|
735
735
|
currentKeydownDom = keydownDom;
|
|
736
|
-
keydownDom.classList.remove(
|
|
736
|
+
keydownDom.classList.remove('select-popover-list-item-keydown');
|
|
737
737
|
}
|
|
738
738
|
// 下
|
|
739
739
|
if (e.keyCode === 40) {
|
|
@@ -760,11 +760,11 @@ var Select = function Select(props) {
|
|
|
760
760
|
if (constData.scroll) return;
|
|
761
761
|
var target = closest(e.target, '.select-popover-list-item');
|
|
762
762
|
if (!target) return;
|
|
763
|
-
target.classList.add(
|
|
763
|
+
target.classList.add('select-popover-list-item-hover');
|
|
764
764
|
// 鼠标移入清除所有keydown
|
|
765
|
-
var selectDom = document.querySelector(
|
|
765
|
+
var selectDom = document.querySelector(".".concat(classOneSelect));
|
|
766
766
|
var keydownDom = selectDom.querySelector('.select-popover-list-item-keydown');
|
|
767
|
-
if (keydownDom) keydownDom.classList.remove(
|
|
767
|
+
if (keydownDom) keydownDom.classList.remove('select-popover-list-item-keydown');
|
|
768
768
|
};
|
|
769
769
|
/**
|
|
770
770
|
* 鼠标移出
|
|
@@ -773,7 +773,7 @@ var Select = function Select(props) {
|
|
|
773
773
|
var mouseLeave = function mouseLeave(e) {
|
|
774
774
|
var target = closest(e.target, '.select-popover-list-item');
|
|
775
775
|
if (!target) return;
|
|
776
|
-
target.classList.remove(
|
|
776
|
+
target.classList.remove('select-popover-list-item-hover');
|
|
777
777
|
};
|
|
778
778
|
// 外标题memo
|
|
779
779
|
var OutLabelMemo = useMemo(function () {
|
|
@@ -781,7 +781,7 @@ var Select = function Select(props) {
|
|
|
781
781
|
var handLabelClass = function handLabelClass() {
|
|
782
782
|
var str = 'select-label';
|
|
783
783
|
if (labelTooltip && labelTooltip.className) {
|
|
784
|
-
str +=
|
|
784
|
+
str += " ".concat(labelTooltip.className);
|
|
785
785
|
}
|
|
786
786
|
return str;
|
|
787
787
|
};
|
|
@@ -843,7 +843,7 @@ var Select = function Select(props) {
|
|
|
843
843
|
var renderContentVal = renderContent && renderContent(listJson[valueCom[0]], false);
|
|
844
844
|
if (overLineCom) return renderContentVal || val;
|
|
845
845
|
return jsx(AutoTips, Object.assign({
|
|
846
|
-
placement:
|
|
846
|
+
placement: 'top-start'
|
|
847
847
|
}, {
|
|
848
848
|
children: renderContentVal || val
|
|
849
849
|
}));
|
|
@@ -883,7 +883,7 @@ var Select = function Select(props) {
|
|
|
883
883
|
}, {
|
|
884
884
|
children: [jsx("span", {
|
|
885
885
|
children: jsx(AutoTips, Object.assign({
|
|
886
|
-
placement:
|
|
886
|
+
placement: 'top-start'
|
|
887
887
|
}, {
|
|
888
888
|
children: handContent(index)
|
|
889
889
|
}))
|
|
@@ -973,7 +973,7 @@ var Select = function Select(props) {
|
|
|
973
973
|
}, {
|
|
974
974
|
children: [jsx("span", {
|
|
975
975
|
children: jsx(AutoTips, Object.assign({
|
|
976
|
-
placement:
|
|
976
|
+
placement: 'top-start'
|
|
977
977
|
}, {
|
|
978
978
|
children: handContent(index)
|
|
979
979
|
}))
|
|
@@ -1022,7 +1022,7 @@ var Select = function Select(props) {
|
|
|
1022
1022
|
className: "select-popover-list-item-label"
|
|
1023
1023
|
}, {
|
|
1024
1024
|
children: jsx(AutoTips, Object.assign({
|
|
1025
|
-
placement:
|
|
1025
|
+
placement: 'top-start'
|
|
1026
1026
|
}, {
|
|
1027
1027
|
children: renderContentVal || val
|
|
1028
1028
|
}))
|
|
@@ -1091,7 +1091,7 @@ var Select = function Select(props) {
|
|
|
1091
1091
|
className: "select-nodata"
|
|
1092
1092
|
}, {
|
|
1093
1093
|
children: jsx(Empty, Object.assign({}, emptyProps, {
|
|
1094
|
-
size: (emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.size) ||
|
|
1094
|
+
size: (emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.size) || 'small'
|
|
1095
1095
|
}))
|
|
1096
1096
|
})), loading && jsx(Loading, {})]
|
|
1097
1097
|
}));
|
|
@@ -1100,13 +1100,13 @@ var Select = function Select(props) {
|
|
|
1100
1100
|
var SelectPopoverMemo = useMemo(function () {
|
|
1101
1101
|
if (!showSelect) return '';
|
|
1102
1102
|
var handSelectPopoverMemoClass = function handSelectPopoverMemoClass() {
|
|
1103
|
-
var classStr =
|
|
1103
|
+
var classStr = "select-popover-content ".concat(classOneSelect);
|
|
1104
1104
|
if (search && searchModel === 'inside') classStr += ' select-popover-content-search';
|
|
1105
1105
|
return classStr;
|
|
1106
1106
|
};
|
|
1107
1107
|
return jsxs("div", Object.assign({
|
|
1108
1108
|
style: {
|
|
1109
|
-
width: (posDom && posDom.current ? posDom.current.offsetWidth : 0
|
|
1109
|
+
width: "".concat(posDom && posDom.current ? posDom.current.offsetWidth : 0, "px")
|
|
1110
1110
|
},
|
|
1111
1111
|
className: handSelectPopoverMemoClass()
|
|
1112
1112
|
}, {
|
package/SelectInput/index.js
CHANGED
|
@@ -39,8 +39,8 @@ import '../HelperText/index.js';
|
|
|
39
39
|
|
|
40
40
|
var SelectInput = function SelectInput(props) {
|
|
41
41
|
var handClass = function handClass() {
|
|
42
|
-
var str = $prefixCls
|
|
43
|
-
if (props.className) str +=
|
|
42
|
+
var str = "".concat($prefixCls, "-select-input");
|
|
43
|
+
if (props.className) str += " ".concat(props.className);
|
|
44
44
|
return str;
|
|
45
45
|
};
|
|
46
46
|
return jsx(Select, Object.assign({}, props, {
|