@para-ui/core 4.0.31 → 4.0.33
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/AutoButton/index.js +2 -2
- package/Card/index.js +2 -2
- package/CollapseLayout/index.js +1 -1
- package/ComboSelect/index.js +3 -0
- package/DynamicMultiBox/index.js +1 -1
- package/Form/index.js +4 -1
- package/FormItem/index.js +4 -1
- package/InputCode/index.d.ts +82 -0
- package/InputCode/index.js +392 -0
- package/InputCode/inputCodeCard/index.d.ts +10 -0
- package/InputCode/inputCodeInput/index.d.ts +10 -0
- package/InputCode/lang/en_US.d.ts +7 -0
- package/InputCode/lang/index.d.ts +15 -0
- package/InputCode/lang/zh_CN.d.ts +7 -0
- package/PopConfirm/index.js +2 -2
- package/Querying/index.js +4 -4
- package/README.md +10 -0
- package/Select/index.js +2 -2
- package/SortBox/index.js +24 -4
- package/Table/index.js +149 -29
- package/Table/interface.d.ts +9 -1
- package/Table/lang/en_US.d.ts +1 -0
- package/Table/lang/index.d.ts +2 -0
- package/Table/lang/zh_CN.d.ts +1 -0
- package/Table/tableBodyElement/index.d.ts +5 -0
- package/Table/tableBodyInterface.d.ts +4 -0
- package/Table/tableHeadInterface.d.ts +2 -0
- package/index.d.ts +2 -0
- package/index.js +2 -1
- package/locale/en-US.d.ts +7 -0
- package/locale/index.d.ts +14 -0
- package/locale/index.js +16 -2
- package/locale/zh-CN.d.ts +7 -0
- package/package.json +1 -1
- package/umd/AutoButton.js +5 -5
- package/umd/CollapseLayout.js +1 -1
- package/umd/ComboSelect.js +19 -7
- package/umd/DynamicMultiBox.js +6 -6
- package/umd/Form.js +19 -7
- package/umd/FormItem.js +19 -7
- package/umd/InputCode.js +43 -0
- package/umd/SortBox.js +2 -2
- package/umd/Table.js +19 -7
- package/umd/locale.js +1 -1
- /package/_verture/{index-3795d730.js → index-e229330e.js} +0 -0
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
import { a as __awaiter } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useRef, useEffect, Fragment } from 'react';
|
|
4
|
+
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
|
|
7
|
+
import HelperText from '../HelperText/index.js';
|
|
8
|
+
import { TextField } from '../TextField/index.js';
|
|
9
|
+
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
|
+
import Label from '../Label/index.js';
|
|
11
|
+
import { Button } from '../Button/index.js';
|
|
12
|
+
import AutoTips from '../AutoTips/index.js';
|
|
13
|
+
import '../_verture/index-ca413216.js';
|
|
14
|
+
import '@paraview/lib';
|
|
15
|
+
import '@para-ui/icons/PreviewClose';
|
|
16
|
+
import '@para-ui/icons/PreviewOpen';
|
|
17
|
+
import '@para-ui/icons/CloseCircleF';
|
|
18
|
+
import '../Loading/index.js';
|
|
19
|
+
import '@para-ui/icons/LoadingF';
|
|
20
|
+
import '../Tooltip/index.js';
|
|
21
|
+
import 'rc-tooltip';
|
|
22
|
+
import 'rc-tooltip/lib/placements';
|
|
23
|
+
import '@para-ui/icons/Forbid';
|
|
24
|
+
import '../_verture/useGlobalProps-4ae1a007.js';
|
|
25
|
+
import '../_verture/index-bde7aabe.js';
|
|
26
|
+
import 'rc-dropdown';
|
|
27
|
+
import '../_verture/usePopupContainer-635f66f4.js';
|
|
28
|
+
import 'dayjs';
|
|
29
|
+
import '../Help/index.js';
|
|
30
|
+
import '@para-ui/icons/Help';
|
|
31
|
+
import '@para-ui/icons/Down';
|
|
32
|
+
|
|
33
|
+
var en = {
|
|
34
|
+
retrievedAgain: '{second} seconds to retrieve again',
|
|
35
|
+
reset: 'resend',
|
|
36
|
+
getCode: 'Get Code',
|
|
37
|
+
secondCountdown: '{second}s'
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var zh = {
|
|
41
|
+
retrievedAgain: '{second}秒后可重新获取',
|
|
42
|
+
reset: '重新发送',
|
|
43
|
+
getCode: '获取验证码',
|
|
44
|
+
secondCountdown: '{second}秒'
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var localeJson = {
|
|
48
|
+
zh: zh,
|
|
49
|
+
en: en
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
var css_248z$2 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-input-code.paraui-v4-input-code-card {\n text-align: center;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .tip {\n margin-bottom: 20px;\n text-align: center;\n font-size: 14px;\n color: rgb(29, 33, 38);\n line-height: 20px;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .tip > span .countdown {\n display: inline-block;\n min-width: 20px;\n text-align: center;\n text-decoration: underline;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .tip > .reset-code {\n color: rgb(46, 101, 230);\n cursor: pointer;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .tip > .reset-code:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .content {\n display: inline-block;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .content > .content-card {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .content > .content-card > .card-input {\n width: 40px;\n height: 40px;\n margin-right: 10px;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .content > .content-card > .card-input > .text-field-content {\n height: 40px;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .content > .content-card > .card-input > .text-field-content > .text-field-content-within > .text-field-content-within-input {\n height: 38px;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .content > .content-card > .card-input > .text-field-content > .text-field-content-within > .text-field-content-within-input > input {\n text-align: center;\n font-size: 20px;\n padding: 0;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .content > .content-card > .separator {\n margin-right: 10px;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card > .content > .paraui-v4-helper-text {\n text-align: left;\n}\n.paraui-v4-input-code.paraui-v4-input-code-card.paraui-v4-input-code-card-underline > .content > .content-card > .card-input > .text-field-content {\n border-left: none;\n border-top: none;\n border-right: none;\n border-radius: 0;\n}";
|
|
53
|
+
styleInject(css_248z$2);
|
|
54
|
+
|
|
55
|
+
const InputCodeCard = props => {
|
|
56
|
+
const {
|
|
57
|
+
className,
|
|
58
|
+
style,
|
|
59
|
+
type = 'card',
|
|
60
|
+
size = 'large',
|
|
61
|
+
cardNumber = 6,
|
|
62
|
+
separator = '-',
|
|
63
|
+
defaultValue,
|
|
64
|
+
value,
|
|
65
|
+
countdown = 60,
|
|
66
|
+
refreshCountdown,
|
|
67
|
+
error = false,
|
|
68
|
+
hideErrorDom,
|
|
69
|
+
helperText,
|
|
70
|
+
sendText,
|
|
71
|
+
inputProps,
|
|
72
|
+
onChange,
|
|
73
|
+
onFinish,
|
|
74
|
+
onReset
|
|
75
|
+
} = props;
|
|
76
|
+
const intl = useFormatMessage('InputCode', localeJson);
|
|
77
|
+
const [valueCom, setValueCom] = useState(new Array(cardNumber).fill(''));
|
|
78
|
+
const [countdownCom, setCountdownCom] = useState(countdown);
|
|
79
|
+
const [countdownLoading, setCountdownLoading] = useState(false);
|
|
80
|
+
const comRef = useRef(null);
|
|
81
|
+
const constData = useRef({
|
|
82
|
+
countdown,
|
|
83
|
+
countdownCom
|
|
84
|
+
});
|
|
85
|
+
constData.current.countdownCom = countdownCom;
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (props.defaultValue !== undefined) {
|
|
88
|
+
setValueCom(props.defaultValue);
|
|
89
|
+
}
|
|
90
|
+
onFocusDom(0);
|
|
91
|
+
return () => {
|
|
92
|
+
clearInterval(constData.current.timer);
|
|
93
|
+
};
|
|
94
|
+
}, []);
|
|
95
|
+
useEffect(() => {
|
|
96
|
+
if (value !== undefined) {
|
|
97
|
+
setValueCom(value);
|
|
98
|
+
}
|
|
99
|
+
}, [value]);
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
if (refreshCountdown !== undefined && refreshCountdown !== null) {
|
|
102
|
+
startCountdown();
|
|
103
|
+
}
|
|
104
|
+
}, [refreshCountdown]);
|
|
105
|
+
// 倒计时
|
|
106
|
+
const startCountdown = () => {
|
|
107
|
+
clearInterval(constData.current.timer);
|
|
108
|
+
constData.current.countdownCom = constData.current.countdown;
|
|
109
|
+
setCountdownCom(constData.current.countdownCom);
|
|
110
|
+
onFocusDom(0);
|
|
111
|
+
setCountdownLoading(true);
|
|
112
|
+
constData.current.timer = setInterval(() => {
|
|
113
|
+
constData.current.countdownCom--;
|
|
114
|
+
setCountdownCom(constData.current.countdownCom);
|
|
115
|
+
if (constData.current.countdownCom === 0) {
|
|
116
|
+
clearInterval(constData.current.timer);
|
|
117
|
+
setCountdownLoading(false);
|
|
118
|
+
}
|
|
119
|
+
}, 1000);
|
|
120
|
+
};
|
|
121
|
+
// 得到焦点
|
|
122
|
+
const onFocusDom = index => {
|
|
123
|
+
if (!comRef.current) return;
|
|
124
|
+
const inputDom = comRef.current.querySelector(".card-input-".concat(index, " input"));
|
|
125
|
+
inputDom.focus();
|
|
126
|
+
};
|
|
127
|
+
const changeInput = index => event => {
|
|
128
|
+
let val = event.target.value.trim();
|
|
129
|
+
val = val[val.length - 1] || '';
|
|
130
|
+
valueCom[index] = val;
|
|
131
|
+
if (props.value === undefined) {
|
|
132
|
+
setValueCom([...valueCom]);
|
|
133
|
+
}
|
|
134
|
+
onChange && onChange([...valueCom]);
|
|
135
|
+
if (index === cardNumber - 1) {
|
|
136
|
+
// 最后一个
|
|
137
|
+
const str = valueCom.join('');
|
|
138
|
+
if (str.length === cardNumber) onFinish && onFinish(str);
|
|
139
|
+
} else {
|
|
140
|
+
if (val !== '') onFocusDom(++index);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const onKeydown = index => event => {
|
|
144
|
+
var _a;
|
|
145
|
+
if (event.keyCode === 8 && index !== 0 && ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) === '') {
|
|
146
|
+
onFocusDom(index - 1);
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const handleContent = () => {
|
|
150
|
+
const evenNUmber = cardNumber % 2;
|
|
151
|
+
return jsx("div", Object.assign({
|
|
152
|
+
className: 'content-card'
|
|
153
|
+
}, {
|
|
154
|
+
children: new Array(cardNumber).fill(1).map((item, index) => {
|
|
155
|
+
return jsxs(Fragment, {
|
|
156
|
+
children: [jsx(TextField, Object.assign({}, inputProps === null || inputProps === void 0 ? void 0 : inputProps(index), {
|
|
157
|
+
className: "card-input card-input-".concat(index),
|
|
158
|
+
error: error,
|
|
159
|
+
hideErrorDom: true,
|
|
160
|
+
value: valueCom[index],
|
|
161
|
+
onChange: changeInput(index),
|
|
162
|
+
onKeydown: onKeydown(index)
|
|
163
|
+
})), separator && evenNUmber === 0 && index + 1 === cardNumber / 2 && jsx("div", Object.assign({
|
|
164
|
+
className: 'separator'
|
|
165
|
+
}, {
|
|
166
|
+
children: separator
|
|
167
|
+
}))]
|
|
168
|
+
}, index);
|
|
169
|
+
})
|
|
170
|
+
}));
|
|
171
|
+
};
|
|
172
|
+
const onResetCom = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
173
|
+
if (constData.current.reqLoading) return;
|
|
174
|
+
constData.current.reqLoading = true;
|
|
175
|
+
const bol = yield onReset === null || onReset === void 0 ? void 0 : onReset();
|
|
176
|
+
constData.current.reqLoading = false;
|
|
177
|
+
if (bol) {
|
|
178
|
+
startCountdown();
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
return jsxs("div", Object.assign({
|
|
182
|
+
className: clsx(className, "".concat($prefixCls, "-input-code"), "".concat($prefixCls, "-input-code-card"), "".concat($prefixCls, "-input-code-card-").concat(size), "".concat($prefixCls, "-input-code-card-").concat(type), {
|
|
183
|
+
["".concat($prefixCls, "-input-code-card-countdown")]: countdownLoading,
|
|
184
|
+
["".concat($prefixCls, "-input-code-card-error")]: error
|
|
185
|
+
}),
|
|
186
|
+
style: style,
|
|
187
|
+
ref: comRef
|
|
188
|
+
}, {
|
|
189
|
+
children: [refreshCountdown !== undefined && refreshCountdown !== null && jsxs("div", Object.assign({
|
|
190
|
+
className: 'tip'
|
|
191
|
+
}, {
|
|
192
|
+
children: [jsx("span", {
|
|
193
|
+
children: sendText
|
|
194
|
+
}), countdownLoading ? jsx("span", {
|
|
195
|
+
children: intl({
|
|
196
|
+
id: 'retrievedAgain'
|
|
197
|
+
}, {
|
|
198
|
+
second: jsx("span", Object.assign({
|
|
199
|
+
className: 'countdown'
|
|
200
|
+
}, {
|
|
201
|
+
children: countdownCom
|
|
202
|
+
}), 'countdown')
|
|
203
|
+
})
|
|
204
|
+
}) : jsx("span", Object.assign({
|
|
205
|
+
className: 'reset-code',
|
|
206
|
+
onClick: onResetCom
|
|
207
|
+
}, {
|
|
208
|
+
children: intl({
|
|
209
|
+
id: 'reset'
|
|
210
|
+
})
|
|
211
|
+
}))]
|
|
212
|
+
})), jsxs("div", Object.assign({
|
|
213
|
+
className: 'content'
|
|
214
|
+
}, {
|
|
215
|
+
children: [handleContent(), jsx(HelperText, {
|
|
216
|
+
error: error,
|
|
217
|
+
helperText: helperText,
|
|
218
|
+
hideErrorDom: hideErrorDom
|
|
219
|
+
})]
|
|
220
|
+
}))]
|
|
221
|
+
}));
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-input-code.paraui-v4-input-code-input > .content {\n display: flex;\n}\n.paraui-v4-input-code.paraui-v4-input-code-input > .content > .get-code {\n margin-left: 10px;\n text-align: center;\n}\n.paraui-v4-input-code.paraui-v4-input-code-input > .content > .content-input {\n flex: 1;\n overflow: hidden;\n}\n.paraui-v4-input-code.paraui-v4-input-code-input > .content > .content-input .text-field-content-after {\n padding: 0;\n}\n.paraui-v4-input-code.paraui-v4-input-code-input > .content > .content-input .text-field-content-after .get-code-input {\n padding: 0 10px;\n color: rgb(46, 101, 230);\n cursor: pointer;\n text-align: center;\n}\n.paraui-v4-input-code.paraui-v4-input-code-input > .content > .content-input .text-field-content-after .get-code-input:hover {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-input-code.paraui-v4-input-code-input > .content > .content-input > .paraui-v4-helper-text {\n display: none;\n}\n.paraui-v4-input-code.paraui-v4-input-code-input.paraui-v4-input-code-input-countdown > .content .text-field-content-after .get-code-input {\n color: rgb(92, 101, 115);\n cursor: not-allowed;\n}\n.paraui-v4-input-code.paraui-v4-input-code-input.paraui-v4-input-code-input-countdown > .content .text-field-content-after .get-code-input:hover {\n color: rgb(92, 101, 115);\n}";
|
|
225
|
+
styleInject(css_248z$1);
|
|
226
|
+
|
|
227
|
+
const InputCodeInput = props => {
|
|
228
|
+
const {
|
|
229
|
+
className,
|
|
230
|
+
style,
|
|
231
|
+
size,
|
|
232
|
+
type = 'btnIntegrated',
|
|
233
|
+
label,
|
|
234
|
+
labelTooltip,
|
|
235
|
+
placeholder,
|
|
236
|
+
required,
|
|
237
|
+
error = false,
|
|
238
|
+
hideErrorDom,
|
|
239
|
+
helperText,
|
|
240
|
+
countdown = 60,
|
|
241
|
+
defaultValue,
|
|
242
|
+
value,
|
|
243
|
+
onGetCode,
|
|
244
|
+
getCodeWidth = '100px',
|
|
245
|
+
inputProps,
|
|
246
|
+
onChange
|
|
247
|
+
} = props;
|
|
248
|
+
const intl = useFormatMessage('InputCode', localeJson);
|
|
249
|
+
const [valueCom, setValueCom] = useState('');
|
|
250
|
+
const [countdownCom, setCountdownCom] = useState(countdown);
|
|
251
|
+
const [countdownLoading, setCountdownLoading] = useState(false);
|
|
252
|
+
const comRef = useRef(null);
|
|
253
|
+
const constData = useRef({
|
|
254
|
+
countdown,
|
|
255
|
+
countdownCom
|
|
256
|
+
});
|
|
257
|
+
useEffect(() => {
|
|
258
|
+
if (props.defaultValue !== undefined) {
|
|
259
|
+
setValueCom(props.defaultValue);
|
|
260
|
+
}
|
|
261
|
+
return () => {
|
|
262
|
+
clearInterval(constData.current.timer);
|
|
263
|
+
};
|
|
264
|
+
}, []);
|
|
265
|
+
useEffect(() => {
|
|
266
|
+
if (value !== undefined) {
|
|
267
|
+
setValueCom(value);
|
|
268
|
+
}
|
|
269
|
+
}, [value]);
|
|
270
|
+
// 倒计时
|
|
271
|
+
const startCountdown = () => {
|
|
272
|
+
clearInterval(constData.current.timer);
|
|
273
|
+
constData.current.countdownCom = constData.current.countdown;
|
|
274
|
+
setCountdownCom(constData.current.countdownCom);
|
|
275
|
+
setCountdownLoading(true);
|
|
276
|
+
constData.current.timer = setInterval(() => {
|
|
277
|
+
constData.current.countdownCom--;
|
|
278
|
+
setCountdownCom(constData.current.countdownCom);
|
|
279
|
+
if (constData.current.countdownCom === 0) {
|
|
280
|
+
clearInterval(constData.current.timer);
|
|
281
|
+
setCountdownLoading(false);
|
|
282
|
+
}
|
|
283
|
+
}, 1000);
|
|
284
|
+
};
|
|
285
|
+
/** 处理标题 */
|
|
286
|
+
const renderLabel = () => {
|
|
287
|
+
if (label || required) {
|
|
288
|
+
return jsx(Label, Object.assign({
|
|
289
|
+
label: label,
|
|
290
|
+
required: required
|
|
291
|
+
}, labelTooltip));
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
/** 获取验证码事件 */
|
|
295
|
+
const getCodeFunc = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
296
|
+
if (constData.current.reqLoading) return;
|
|
297
|
+
constData.current.reqLoading = true;
|
|
298
|
+
const bol = yield onGetCode === null || onGetCode === void 0 ? void 0 : onGetCode();
|
|
299
|
+
constData.current.reqLoading = false;
|
|
300
|
+
if (bol) {
|
|
301
|
+
startCountdown();
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
const handleCodeText = () => {
|
|
305
|
+
if (countdownLoading) {
|
|
306
|
+
return intl({
|
|
307
|
+
id: 'secondCountdown'
|
|
308
|
+
}, {
|
|
309
|
+
second: countdownCom
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
return intl({
|
|
313
|
+
id: "getCode"
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
/** 渲染输入框按钮 */
|
|
317
|
+
const addonAfterRender = () => {
|
|
318
|
+
if (type === 'btnSplit') return undefined;
|
|
319
|
+
return jsx("div", Object.assign({
|
|
320
|
+
className: 'get-code-input',
|
|
321
|
+
style: {
|
|
322
|
+
width: getCodeWidth
|
|
323
|
+
},
|
|
324
|
+
onClick: getCodeFunc
|
|
325
|
+
}, {
|
|
326
|
+
children: jsx(AutoTips, {
|
|
327
|
+
children: handleCodeText()
|
|
328
|
+
})
|
|
329
|
+
}));
|
|
330
|
+
};
|
|
331
|
+
/** 改变输入框 */
|
|
332
|
+
const onChangeInput = event => {
|
|
333
|
+
const val = event.target.value.trim();
|
|
334
|
+
if (props.value === undefined) {
|
|
335
|
+
setValueCom(val);
|
|
336
|
+
}
|
|
337
|
+
onChange && onChange(val);
|
|
338
|
+
};
|
|
339
|
+
/** 渲染内容 */
|
|
340
|
+
const renderContent = () => {
|
|
341
|
+
return jsxs("div", Object.assign({
|
|
342
|
+
className: 'content'
|
|
343
|
+
}, {
|
|
344
|
+
children: [jsx(TextField, Object.assign({}, inputProps, {
|
|
345
|
+
className: 'content-input',
|
|
346
|
+
size: size,
|
|
347
|
+
error: error,
|
|
348
|
+
hideErrorDom: true,
|
|
349
|
+
placeholder: placeholder,
|
|
350
|
+
addonAfter: addonAfterRender(),
|
|
351
|
+
value: valueCom,
|
|
352
|
+
onChange: onChangeInput
|
|
353
|
+
})), type === 'btnSplit' && jsx(Button, Object.assign({
|
|
354
|
+
size: size,
|
|
355
|
+
className: 'get-code',
|
|
356
|
+
style: {
|
|
357
|
+
width: getCodeWidth
|
|
358
|
+
},
|
|
359
|
+
disabled: countdownLoading,
|
|
360
|
+
onClick: getCodeFunc
|
|
361
|
+
}, {
|
|
362
|
+
children: jsx(AutoTips, {
|
|
363
|
+
children: handleCodeText()
|
|
364
|
+
})
|
|
365
|
+
}))]
|
|
366
|
+
}));
|
|
367
|
+
};
|
|
368
|
+
return jsxs("div", Object.assign({
|
|
369
|
+
className: clsx(className, "".concat($prefixCls, "-input-code"), "".concat($prefixCls, "-input-code-input"), "".concat($prefixCls, "-input-code-input-").concat(size), "".concat($prefixCls, "-input-code-input-").concat(type), {
|
|
370
|
+
["".concat($prefixCls, "-input-code-input-countdown")]: countdownLoading,
|
|
371
|
+
["".concat($prefixCls, "-input-code-input-error")]: error
|
|
372
|
+
}),
|
|
373
|
+
style: style,
|
|
374
|
+
ref: comRef
|
|
375
|
+
}, {
|
|
376
|
+
children: [renderLabel(), renderContent(), jsx(HelperText, {
|
|
377
|
+
error: error,
|
|
378
|
+
helperText: helperText,
|
|
379
|
+
hideErrorDom: hideErrorDom
|
|
380
|
+
})]
|
|
381
|
+
}));
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/";
|
|
385
|
+
styleInject(css_248z);
|
|
386
|
+
|
|
387
|
+
const InputCode = {
|
|
388
|
+
Card: InputCodeCard,
|
|
389
|
+
Input: InputCodeInput
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
export { InputCode, InputCode as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2024/8/16 16:33
|
|
4
|
+
* @description 验证码
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { InputCodeCardProps } from "../index";
|
|
8
|
+
import './index.scss';
|
|
9
|
+
export declare const InputCodeCard: FunctionComponent<InputCodeCardProps>;
|
|
10
|
+
export default InputCodeCard;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2024/8/16 16:33
|
|
4
|
+
* @description 验证码
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { InputCodeInputProps } from "../index";
|
|
8
|
+
import './index.scss';
|
|
9
|
+
export declare const InputCodeInput: FunctionComponent<InputCodeInputProps>;
|
|
10
|
+
export default InputCodeInput;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
zh: {
|
|
3
|
+
retrievedAgain: string;
|
|
4
|
+
reset: string;
|
|
5
|
+
getCode: string;
|
|
6
|
+
secondCountdown: string;
|
|
7
|
+
};
|
|
8
|
+
en: {
|
|
9
|
+
retrievedAgain: string;
|
|
10
|
+
reset: string;
|
|
11
|
+
getCode: string;
|
|
12
|
+
secondCountdown: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
package/PopConfirm/index.js
CHANGED
|
@@ -35,8 +35,8 @@ var zh = {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
var localeJson = {
|
|
38
|
-
zh
|
|
39
|
-
en
|
|
38
|
+
zh,
|
|
39
|
+
en
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/2 下午1:44\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-popconfirm.paraui-v4-tooltip {\n position: absolute;\n width: 440px;\n padding: 0;\n font-size: 14px;\n color: initial;\n background-color: rgb(255, 255, 255);\n box-shadow: 1px 1px 10px 2px rgba(212, 218, 227, 0.4);\n border-radius: 8px;\n border: 1px solid rgba(212, 218, 227, 0.4);\n}\n.paraui-v4-popconfirm.component-tooltip-hidden.paraui-v4-tooltip {\n border: none;\n}\n.paraui-v4-popconfirm.paraui-v4-tooltip .component-tooltip-inner {\n padding: 0;\n color: initial;\n background-color: transparent;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper {\n padding: 16px;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message {\n position: relative;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-icon {\n position: absolute;\n top: 1px;\n color: rgb(255, 147, 38);\n line-height: 0;\n font-size: 18px;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-icon svg {\n color: inherit;\n font-size: inherit;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-body {\n padding-left: 24px;\n line-height: 20px;\n font-size: 14px;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-title {\n font-weight: 600;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-content {\n font-weight: 400;\n margin-top: 8px;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-content.without-title {\n margin-top: 0;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-description {\n margin-top: 4px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-description.without-title-or-content {\n margin-top: 0;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-btns {\n margin-top: 12px;\n text-align: right;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-btns > button + button {\n margin-left: 12px;\n}\n.paraui-v4-popconfirm .paraui-v4-popconfirm-btn {\n min-width: 54px;\n}";
|
package/Querying/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import 'react';
|
|
|
8
8
|
import '../_verture/index-ca413216.js';
|
|
9
9
|
import '@paraview/lib';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
var LargeSearch = function LargeSearch() {
|
|
12
12
|
return jsx("svg", Object.assign({
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
width: "100%",
|
|
@@ -445,7 +445,7 @@ const LargeSearch = () => {
|
|
|
445
445
|
}))
|
|
446
446
|
}));
|
|
447
447
|
};
|
|
448
|
-
|
|
448
|
+
var SmallSearch = function SmallSearch() {
|
|
449
449
|
return jsx("svg", Object.assign({
|
|
450
450
|
xmlns: "http://www.w3.org/2000/svg",
|
|
451
451
|
width: "100%",
|
|
@@ -684,8 +684,8 @@ var zh = {
|
|
|
684
684
|
};
|
|
685
685
|
|
|
686
686
|
var localeJson = {
|
|
687
|
-
zh,
|
|
688
|
-
en
|
|
687
|
+
zh: zh,
|
|
688
|
+
en: en
|
|
689
689
|
};
|
|
690
690
|
|
|
691
691
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/2 上午10:55\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-querying {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n}\n.paraui-v4-querying > .querying-image {\n line-height: 0;\n overflow: hidden;\n}\n.paraui-v4-querying > .querying-image img {\n width: 100%;\n}\n.paraui-v4-querying .querying-image-large {\n width: 334px;\n height: 238px;\n}\n.paraui-v4-querying .querying-image-small {\n width: 120px;\n height: 80px;\n}\n.paraui-v4-querying > .querying-description {\n line-height: 17px;\n font-size: 14px;\n font-weight: 400;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-querying.paraui-v4-querying-large > .querying-description {\n margin-top: 20px;\n}\n.paraui-v4-querying.paraui-v4-querying-small > .querying-description {\n margin-top: 10px;\n font-size: 14px;\n}";
|
package/README.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 版本: 4.0.33
|
|
2
|
+
para-ui/core@4.0.33 发布
|
|
3
|
+
【表格-Table】新增拖拽排序表格
|
|
4
|
+
【自动按钮-AutoButton】新增拖拽排序表格
|
|
5
|
+
|
|
6
|
+
## 版本: 4.0.32
|
|
7
|
+
para-ui/core@4.0.32 发布
|
|
8
|
+
【验证码-InputCode】新增验证码组件
|
|
9
|
+
【排序容器-SortBox】修改排序事件
|
|
10
|
+
|
|
1
11
|
## 版本: 4.0.31
|
|
2
12
|
para-ui/core@4.0.31 发布
|
|
3
13
|
【滑块验证码-DragVerify】阻止移动端滑块触发屏幕滑动事件
|
package/Select/index.js
CHANGED
|
@@ -42,8 +42,8 @@ var zh = {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
var localeJson = {
|
|
45
|
-
zh
|
|
46
|
-
en
|
|
45
|
+
zh,
|
|
46
|
+
en
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-select {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n display: inline-block;\n vertical-align: top;\n width: 100%;\n}\n.paraui-v4-select > .select-content {\n line-height: 0;\n border: 1px solid;\n border-radius: 4px;\n border-color: rgb(212, 218, 227);\n padding-right: 10px;\n position: relative;\n cursor: pointer;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-select > .select-content:hover {\n border-color: rgb(87, 131, 235);\n}\n.paraui-v4-select > .select-content:hover > .select-svg > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-select > .select-content > .select-label-placeholder {\n width: 100%;\n height: 100%;\n padding: 0 10px;\n color: rgb(161, 168, 179);\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n position: absolute;\n left: 0;\n top: 0;\n z-index: 1;\n}\n.paraui-v4-select > .select-content > .select-label-placeholder > .select-required {\n margin-left: 2px;\n color: rgb(244, 66, 66);\n}\n.paraui-v4-select > .select-content > .select-svg {\n position: absolute;\n right: 10px;\n top: 0;\n z-index: 2;\n}\n.paraui-v4-select > .select-content > .select-svg > svg {\n font-size: 18px;\n transition: all 0.3s;\n color: rgb(92, 101, 115);\n opacity: 0;\n}\n.paraui-v4-select > .select-content > .select-svg > .clean-up-icon {\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n}\n.paraui-v4-select > .select-content > .select-svg > .clean-up-icon > svg {\n font-size: 16px;\n transition: all 0.3s;\n color: rgb(161, 168, 179);\n}\n.paraui-v4-select > .select-content > .select-svg > .clean-up-icon:hover > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-select > .select-content > .radio-select-content {\n padding-left: 10px;\n font-size: 14px;\n line-height: 1.43;\n color: rgb(29, 33, 38);\n word-break: break-all;\n}\n.paraui-v4-select > .select-content > .radio-search-outside {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n line-height: 1.43;\n padding: 0 10px 0 10px;\n font-size: 14px;\n cursor: pointer;\n color: rgb(29, 33, 38);\n border: 0;\n border-radius: 4px;\n background: transparent;\n z-index: 10;\n}\n.paraui-v4-select > .select-content > .check-select-content {\n padding-left: 10px;\n overflow: hidden;\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-select-content-item {\n display: inline-block;\n background-color: rgb(234, 236, 241);\n border-radius: 2px;\n padding: 0 30px 0 10px;\n color: rgb(29, 33, 38);\n margin-right: 4px;\n vertical-align: top;\n max-width: 100%;\n white-space: nowrap;\n position: relative;\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-select-content-item.check-select-content-item-more {\n cursor: pointer;\n color: rgb(29, 33, 38);\n padding-right: 10px;\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-select-content-item.check-select-content-item-more > span {\n max-width: none;\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-select-content-item.check-select-content-item-more:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-select-content-item > span {\n display: inline-block;\n height: 100%;\n vertical-align: top;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-select-content-item > svg {\n cursor: pointer;\n color: rgb(29, 33, 38);\n font-size: 16px;\n position: absolute;\n z-index: 10;\n right: 10px;\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-select-content-item > svg:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-select-content-item.check-select-content-item-noclose {\n padding-right: 10px;\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-select-content-item.check-select-content-item-noclose > span {\n max-width: none;\n}\n.paraui-v4-select > .select-content > .check-select-content > .check-search-outside {\n width: 10px;\n max-width: 100% !important;\n display: none;\n border: 0;\n color: rgb(29, 33, 38);\n font-size: 14px;\n cursor: pointer;\n}\n.paraui-v4-select.paraui-v4-select-allow-clear > .select-content {\n padding-right: 38px;\n}\n.paraui-v4-select.paraui-v4-select-allow-clear > .select-content .select-label-placeholder {\n padding-right: 38px;\n}\n.paraui-v4-select.paraui-v4-select-allow-clear.paraui-v4-select-value > .select-content:hover > .select-svg > svg {\n opacity: 0;\n transition: all 0s;\n}\n.paraui-v4-select.paraui-v4-select-allow-clear.paraui-v4-select-value > .select-content:hover > .select-svg > .clean-up-icon {\n opacity: 1;\n transition: all 0.3s;\n}\n.paraui-v4-select.paraui-v4-select-allow-clear.paraui-v4-select-value.paraui-v4-select-disabled > .select-content:hover > .select-svg > svg {\n opacity: 1;\n}\n.paraui-v4-select.paraui-v4-select-over-line > .select-content > .check-select-content {\n display: flex;\n flex-wrap: wrap;\n}\n.paraui-v4-select.paraui-v4-select-over-line > .select-content > .check-select-content input {\n flex: 1;\n z-index: 10;\n}\n.paraui-v4-select.paraui-v4-select-over-line.paraui-v4-select-small > .select-content {\n height: inherit;\n min-height: 28px;\n}\n.paraui-v4-select.paraui-v4-select-over-line.paraui-v4-select-small > .select-content > .check-select-content {\n height: 100%;\n}\n.paraui-v4-select.paraui-v4-select-over-line.paraui-v4-select-medium > .select-content {\n height: inherit;\n min-height: 28px;\n}\n.paraui-v4-select.paraui-v4-select-over-line.paraui-v4-select-medium > .select-content > .check-select-content {\n height: 100%;\n}\n.paraui-v4-select.paraui-v4-select-over-line.paraui-v4-select-large > .select-content {\n height: inherit;\n min-height: 32px;\n}\n.paraui-v4-select.paraui-v4-select-over-line.paraui-v4-select-large > .select-content > .check-select-content {\n height: 100%;\n}\n.paraui-v4-select.paraui-v4-select-show-select > .select-content {\n padding-right: 38px;\n}\n.paraui-v4-select.paraui-v4-select-show-select > .select-content .select-label-placeholder {\n padding-right: 38px;\n}\n.paraui-v4-select.paraui-v4-select-show-select > .select-content > .select-svg > svg {\n opacity: 1;\n}\n.paraui-v4-select.paraui-v4-select-show-select > .select-content > .radio-search-outside {\n padding: 0 38px 0 10px;\n}\n.paraui-v4-select.paraui-v4-select-disabled > .select-content {\n background-color: rgb(247, 248, 250);\n cursor: not-allowed;\n}\n.paraui-v4-select.paraui-v4-select-disabled > .select-content:hover {\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-select.paraui-v4-select-disabled > .select-content:hover > .select-svg > svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-select.paraui-v4-select-disabled > .select-content > .radio-select-content {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-select.paraui-v4-select-disabled > .select-content > .check-select-content > .check-select-content-item > span {\n max-width: 100%;\n}\n.paraui-v4-select.paraui-v4-select-error > .select-content {\n border-color: rgb(244, 66, 66) !important;\n}\n.paraui-v4-select.paraui-v4-select-open > .select-content {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-select.paraui-v4-select-open > .select-content > .select-svg > svg {\n transform: rotate(180deg);\n color: rgb(46, 101, 230);\n}\n.paraui-v4-select.paraui-v4-select-open > .select-content > .check-select-content > .check-search-outside {\n display: inline-block;\n}\n.paraui-v4-select.paraui-v4-select-small > .select-content {\n height: 28px;\n}\n.paraui-v4-select.paraui-v4-select-small > .select-content > .select-label-placeholder {\n line-height: 26px;\n}\n.paraui-v4-select.paraui-v4-select-small > .select-content > .select-svg {\n top: 4px;\n}\n.paraui-v4-select.paraui-v4-select-small > .select-content > .radio-select-content {\n padding-bottom: 3px;\n padding-top: 3px;\n}\n.paraui-v4-select.paraui-v4-select-small > .select-content > .check-select-content {\n padding-bottom: 3px;\n height: 26px;\n}\n.paraui-v4-select.paraui-v4-select-small > .select-content > .check-select-content > .check-select-content-item {\n margin-top: 3px;\n height: 20px;\n line-height: 20px;\n}\n.paraui-v4-select.paraui-v4-select-small > .select-content > .check-select-content > .check-select-content-item > svg {\n top: 2px;\n}\n.paraui-v4-select.paraui-v4-select-small > .select-content > .check-select-content > .check-search-outside {\n margin-top: 3px;\n height: 20px;\n}\n.paraui-v4-select.paraui-v4-select-medium > .select-content {\n height: 28px;\n}\n.paraui-v4-select.paraui-v4-select-medium > .select-content > .select-label-placeholder {\n line-height: 26px;\n}\n.paraui-v4-select.paraui-v4-select-medium > .select-content > .select-svg {\n top: 4px;\n}\n.paraui-v4-select.paraui-v4-select-medium > .select-content > .radio-select-content {\n padding-bottom: 3px;\n padding-top: 3px;\n}\n.paraui-v4-select.paraui-v4-select-medium > .select-content > .check-select-content {\n padding-bottom: 3px;\n height: 26px;\n}\n.paraui-v4-select.paraui-v4-select-medium > .select-content > .check-select-content > .check-select-content-item {\n margin-top: 3px;\n height: 20px;\n line-height: 20px;\n}\n.paraui-v4-select.paraui-v4-select-medium > .select-content > .check-select-content > .check-select-content-item > svg {\n top: 2px;\n}\n.paraui-v4-select.paraui-v4-select-medium > .select-content > .check-select-content > .check-search-outside {\n margin-top: 3px;\n height: 20px;\n}\n.paraui-v4-select.paraui-v4-select-large > .select-content {\n height: 32px;\n}\n.paraui-v4-select.paraui-v4-select-large > .select-content > .select-label-placeholder {\n line-height: 30px;\n}\n.paraui-v4-select.paraui-v4-select-large > .select-content > .select-svg {\n top: 6px;\n}\n.paraui-v4-select.paraui-v4-select-large > .select-content > .radio-select-content {\n padding-bottom: 5px;\n padding-top: 5px;\n}\n.paraui-v4-select.paraui-v4-select-large > .select-content > .check-select-content {\n padding-bottom: 3px;\n height: 30px;\n}\n.paraui-v4-select.paraui-v4-select-large > .select-content > .check-select-content > .check-select-content-item {\n margin-top: 3px;\n height: 24px;\n line-height: 24px;\n}\n.paraui-v4-select.paraui-v4-select-large > .select-content > .check-select-content > .check-select-content-item > svg {\n top: 4px;\n}\n.paraui-v4-select.paraui-v4-select-large > .select-content > .check-select-content > .check-search-outside {\n margin-top: 4px;\n height: 22px;\n}\n\n.paraui-v4-select-popover.paraui-v4-select-popover-hide {\n display: none !important;\n}\n.paraui-v4-select-popover.component-dropdown {\n /*&.paraui-v4-select-popover-small {\n & > .select-popover-content {\n & > .select-popover-search {\n height: 30px;\n }\n\n & > .select-popover-list {\n & .select-popover-list-item {\n height: 30px;\n line-height: 30px;\n }\n\n & > .select-popover-list-group {\n & .select-popover-list-group-label {\n height: 30px;\n line-height: 30px;\n }\n }\n }\n }\n }\n\n // 中\n &.paraui-v4-select-popover-medium {\n & > .select-popover-content {\n & > .select-popover-search {\n height: 30px;\n }\n\n & > .select-popover-list {\n & .select-popover-list-item {\n height: 30px;\n line-height: 30px;\n }\n\n & > .select-popover-list-group {\n & .select-popover-list-group-label {\n height: 30px;\n line-height: 30px;\n }\n }\n }\n }\n }\n\n // 大\n &.paraui-v4-select-popover-large {\n & > .select-popover-content {\n & > .select-popover-search {\n height: 30px;\n }\n\n & > .select-popover-list {\n & .select-popover-list-item {\n height: 30px;\n line-height: 30px;\n }\n\n & > .select-popover-list-group {\n & .select-popover-list-group-label {\n height: 30px;\n line-height: 30px;\n }\n }\n }\n }\n }*/\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content {\n padding: 4px 0;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content.select-popover-content-search > .select-popover-list {\n padding-top: 0px;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content.select-popover-content-search > .select-popover-list > .select-nodata {\n margin-top: 20px;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search {\n display: flex;\n align-items: center;\n padding: 0 10px;\n border-bottom: 1px solid;\n border-color: rgb(234, 236, 241);\n height: 30px;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search > input {\n border: 0;\n outline: none;\n font-size: 14px;\n color: rgb(29, 33, 38);\n width: 100%;\n height: 100%;\n line-height: 1.43;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search > input::placeholder {\n font-size: 14px;\n opacity: 1;\n color: rgb(161, 168, 179);\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search > input::-ms-clear {\n display: none;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search > input::-ms-reveal {\n display: none;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search > input:-moz-placeholder {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search > input::-moz-placeholder {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search > input:-ms-input-placeholder { /* Internet Explorer 10-11 */\n color: rgb(161, 168, 179);\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search > input::-ms-input-placeholder { /* Microsoft Edge */\n color: rgb(161, 168, 179);\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-search > svg {\n color: rgb(92, 101, 115);\n font-size: 18px;\n cursor: pointer;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list {\n max-height: 320px;\n overflow: auto;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list.select-popover-list-loading {\n height: 100px;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item {\n display: flex;\n cursor: pointer;\n padding: 0 10px;\n align-items: center;\n height: 30px;\n line-height: 30px;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item > .select-popover-list-item-label {\n flex: 1;\n overflow: hidden;\n color: rgb(29, 33, 38);\n font-size: 14px;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item > .select-popover-list-item-svg {\n line-height: 0;\n display: none;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item > .select-popover-list-item-svg > svg {\n font-size: 18px;\n color: rgb(46, 101, 230);\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item.select-popover-list-item-select > .select-popover-list-item-label {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item.select-popover-list-item-select > .select-popover-list-item-svg {\n display: inline-block;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item.select-popover-list-item-hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item.select-popover-list-item-keydown {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item.select-popover-list-item-disabled {\n cursor: not-allowed;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list .select-popover-list-item.select-popover-list-item-disabled > .select-popover-list-item-label {\n color: rgb(161, 168, 179) !important;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list > .select-popover-list-group .select-popover-list-group-label {\n display: inline-block;\n width: 100%;\n padding: 0 10px;\n color: rgb(161, 168, 179);\n font-size: 12px;\n height: 30px;\n line-height: 30px;\n}\n.paraui-v4-select-popover.component-dropdown .select-popover-content > .select-popover-list > .select-nodata {\n text-align: center;\n font-size: 14px;\n color: rgb(29, 33, 38);\n margin-top: 16px;\n margin-bottom: 29px;\n}\n.paraui-v4-select-more-popover {\n /*// 小\n &.paraui-v4-select-more-popover-small {\n & .select-more {\n & > .select-more-title {\n line-height: 28px;\n }\n\n & > .select-more-content {\n & > .select-more-content-item {\n line-height: 28px;\n }\n }\n }\n }\n\n // 中\n &.paraui-v4-select-more-popover-medium {\n & .select-more {\n & > .select-more-title {\n line-height: 32px;\n }\n\n & > .select-more-content {\n & > .select-more-content-item {\n line-height: 32px;\n }\n }\n }\n }\n\n // 大\n &.paraui-v4-select-more-popover-large {\n & .select-more {\n & > .select-more-title {\n line-height: 36px;\n }\n\n & > .select-more-content {\n & > .select-more-content-item {\n line-height: 36px;\n }\n }\n }\n }*/\n}\n.paraui-v4-select-more-popover .select-more {\n width: 290px;\n padding: 4px 0;\n}\n.paraui-v4-select-more-popover .select-more > .select-more-title {\n font-size: 12px;\n padding: 0 10px;\n color: rgb(161, 168, 179);\n line-height: 30px;\n}\n.paraui-v4-select-more-popover .select-more > .select-more-content {\n max-height: 320px;\n overflow: auto;\n}\n.paraui-v4-select-more-popover .select-more > .select-more-content > .select-more-content-item {\n padding: 0 10px;\n display: flex;\n justify-content: space-around;\n align-items: center;\n line-height: 30px;\n}\n.paraui-v4-select-more-popover .select-more > .select-more-content > .select-more-content-item:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-select-more-popover .select-more > .select-more-content > .select-more-content-item > span {\n flex: 1;\n overflow: hidden;\n display: inline-block;\n font-size: 14px;\n}\n.paraui-v4-select-more-popover .select-more > .select-more-content > .select-more-content-item > svg {\n font-size: 18px;\n position: relative;\n cursor: pointer;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-select-more-popover .select-more > .select-more-content > .select-more-content-item > svg:hover {\n color: rgb(46, 101, 230);\n border-radius: 2px;\n}";
|
package/SortBox/index.js
CHANGED
|
@@ -43,18 +43,38 @@ const SortBox = props => {
|
|
|
43
43
|
}), index);
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
/** 数组交换位置 */
|
|
47
|
+
const moveElementToNthPosition = (arr, indexA, indexB) => {
|
|
48
|
+
// 使用splice方法移除索引a处的元素,并将其存储在变量element中
|
|
49
|
+
const element = arr.splice(indexA, 1)[0];
|
|
50
|
+
// 在索引n处插入被移除的元素
|
|
51
|
+
arr.splice(indexB, 0, element);
|
|
52
|
+
return arr;
|
|
53
|
+
};
|
|
54
|
+
const onDragSort = newList => {};
|
|
55
|
+
const onEnd = evt => {
|
|
56
|
+
if (evt.oldIndex === evt.newIndex) return;
|
|
57
|
+
const newList = [...(list || [])];
|
|
58
|
+
moveElementToNthPosition(newList, evt.oldIndex, evt.newIndex);
|
|
47
59
|
onSort && onSort(newList);
|
|
48
60
|
};
|
|
61
|
+
const handleList = () => {
|
|
62
|
+
const arr = [];
|
|
63
|
+
list === null || list === void 0 ? void 0 : list.forEach(item => {
|
|
64
|
+
arr.push({});
|
|
65
|
+
});
|
|
66
|
+
return arr;
|
|
67
|
+
};
|
|
49
68
|
return jsx("div", Object.assign({
|
|
50
69
|
className: clsx(className, "".concat($prefixCls, "-sort-box"), "".concat($prefixCls, "-sort-box-").concat(type)),
|
|
51
70
|
style: style
|
|
52
71
|
}, {
|
|
53
72
|
children: jsx(dist.exports.ReactSortable, Object.assign({
|
|
54
|
-
list:
|
|
73
|
+
list: handleList(),
|
|
55
74
|
handle: '.sort-icon',
|
|
56
|
-
animation:
|
|
57
|
-
setList: onDragSort
|
|
75
|
+
animation: 300,
|
|
76
|
+
setList: onDragSort,
|
|
77
|
+
onEnd: onEnd
|
|
58
78
|
}, {
|
|
59
79
|
children: handleContent()
|
|
60
80
|
}))
|