@para-ui/core 3.0.28 → 3.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoBox/index.js +48 -88
- package/AutoTips/index.js +25 -32
- package/Breadcrumbs/index.js +43 -63
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +88 -118
- package/ButtonGroup/index.js +27 -36
- package/Carousel/index.d.ts +2 -2
- package/Carousel/index.js +27 -28
- package/Cascader/index.js +52 -64
- package/Checkbox/index.js +23 -39
- package/CheckboxGroup/index.js +31 -48
- package/Collapse/collapsePanel.d.ts +1 -1
- package/Collapse/index.d.ts +1 -1
- package/Collapse/index.js +9 -29
- package/Collapse/util.d.ts +2 -2
- package/CollapseBox/index.js +45 -56
- package/CollapseLayout/index.js +35 -54
- package/ComboSelect/index.js +222 -349
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.js +17 -20
- package/DatePicker/generatePicker/index.d.ts +17 -17
- package/DatePicker/index.d.ts +4 -4
- package/DatePicker/index.js +111 -167
- package/Desktop/index.js +62 -173
- package/Drawer/index.js +65 -58
- package/Drawer/interface.d.ts +7 -3
- package/Dropdown/index.d.ts +1 -1
- package/Dropdown/index.js +3 -3
- package/Empty/index.js +17 -22
- package/Form/index.d.ts +1 -1
- package/Form/index.js +38 -80
- package/FormItem/index.d.ts +1 -1
- package/FormItem/index.js +11 -11
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/index.js +11 -11
- package/GlobalContext/index.js +3 -3
- package/GlobalContext/usePopupContainer.d.ts +1 -1
- package/Help/index.js +11 -11
- package/HelperText/index.js +11 -12
- package/InputLang/index.js +47 -80
- package/InputNumber/index.js +65 -100
- package/Label/index.js +15 -16
- package/Loading/index.js +6 -7
- package/Menu/index.js +148 -328
- package/Menu/interface.d.ts +2 -2
- package/Menu/verticalMenuList.d.ts +1 -1
- package/Message/index.d.ts +1 -1
- package/Message/index.js +45 -64
- package/Modal/Confirm/index.d.ts +2 -2
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +119 -152
- package/MultiBox/index.js +44 -76
- package/Notification/index.d.ts +2 -2
- package/Notification/index.js +51 -72
- package/OperateBtn/index.js +42 -70
- package/PageHeader/index.js +120 -286
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +2 -2
- package/Pagination/index.js +79 -131
- package/ParauiProvider/index.js +2 -3
- package/PasswordRules/index.js +12 -30
- package/PopConfirm/index.d.ts +1 -1
- package/PopConfirm/index.js +52 -59
- package/Popover/index.js +8 -9
- package/Progress/index.d.ts +6 -6
- package/Progress/index.js +50 -89
- package/Querying/index.js +14 -17
- package/README.md +813 -800
- package/Radio/index.js +21 -33
- package/RadioGroup/index.js +32 -47
- package/Search/index.js +44 -66
- package/Select/index.js +176 -343
- package/SelectInput/index.js +8 -9
- package/Selector/index.js +285 -681
- package/SelectorPicker/index.js +62 -97
- package/SingleBox/index.js +30 -55
- package/Slider/index.d.ts +1 -1
- package/Slider/index.js +29 -41
- package/Slider/interface.d.ts +2 -2
- package/Split/index.js +10 -23
- package/Status/index.js +8 -7
- package/Stepper/index.d.ts +1 -1
- package/Stepper/index.js +20 -25
- package/Styles/form.scss +5 -5
- package/Styles/index.scss +37 -37
- package/Styles/normalize.scss +348 -348
- package/Styles/scrollbar.scss +223 -223
- package/Styles/theme.scss +74 -74
- package/Switch/index.d.ts +2 -2
- package/Switch/index.js +19 -20
- package/Table/index.js +568 -1019
- package/Table/interface.d.ts +5 -5
- package/Tabs/index.d.ts +3 -3
- package/Tabs/index.js +47 -65
- package/Tag/TagGroup.d.ts +1 -1
- package/Tag/index.d.ts +2 -2
- package/Tag/index.js +72 -107
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +81 -105
- package/TextField/index.js +141 -220
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +12 -15
- package/Timeline/index.js +42 -52
- package/Title/index.js +10 -9
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.js +50 -70
- package/Tooltip/index.js +64 -98
- package/Tooltip/interface.d.ts +1 -1
- package/Transfer/index.d.ts +1 -1
- package/Transfer/index.js +114 -137
- package/Transfer/useClick.d.ts +1 -1
- package/Tree/index.js +10 -10
- package/Tree/interface.d.ts +6 -6
- package/Upload/Dragger/index.d.ts +1 -1
- package/Upload/ImageUpload/index.d.ts +1 -1
- package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
- package/Upload/index.d.ts +1 -1
- package/Upload/index.js +283 -475
- package/Upload/interface.d.ts +2 -2
- package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
- package/_verture/defineProperty-62acccfc.js +34 -0
- package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
- package/_verture/{index-48875ffd.js → index-131f8fe5.js} +80 -181
- package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
- package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
- package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
- package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
- package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
- package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
- package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
- package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
- package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
- package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
- package/index.d.ts +2 -4
- package/index.js +15 -16
- package/package.json +167 -168
- package/Test/index.d.ts +0 -3
- package/Test/index.js +0 -9
- package/_verture/defineProperty-0590dc61.js +0 -16
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { ReactNode } from 'react';
|
|
7
7
|
/** 菜单类型 */
|
|
8
|
-
export
|
|
8
|
+
export type MenuListTypeType = 'redirect' | 'router' | "iframe" | "snack" | "snackPage";
|
|
9
9
|
/** 菜单列表项参数 */
|
|
10
10
|
export interface MenuChildrenProps {
|
|
11
11
|
/** 样式class */
|
package/Pagination/index.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ import './index.scss';
|
|
|
12
12
|
* pager: 切换页数
|
|
13
13
|
* jumper: 跳转到
|
|
14
14
|
* */
|
|
15
|
-
export
|
|
16
|
-
export
|
|
15
|
+
export type PaginationLayout = 'sizes' | 'currentPage' | 'pageRow' | 'pager' | 'jumper';
|
|
16
|
+
export type PaginationFlippingArrow = 'first' | 'prev' | 'next' | 'last';
|
|
17
17
|
export interface PaginationProps {
|
|
18
18
|
/** class名称 */
|
|
19
19
|
className?: string;
|
package/Pagination/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import React__default, { useState, useRef, useEffect, useMemo } from 'react';
|
|
4
4
|
import GlobalContext from '@para-ui/core/GlobalContext';
|
|
5
5
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
6
|
-
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-
|
|
6
|
+
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-66aa48a1.js';
|
|
7
7
|
import { TextField } from '../TextField/index.js';
|
|
8
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
8
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
9
9
|
import Select from '../Select/index.js';
|
|
10
10
|
import DoubleLeft from '@para-ui/icons/DoubleLeft';
|
|
11
11
|
import NavigateBefore from '@para-ui/icons/Left';
|
|
@@ -29,13 +29,13 @@ import '../AutoTips/index.js';
|
|
|
29
29
|
import '../Loading/index.js';
|
|
30
30
|
import '@para-ui/icons/LoadingF';
|
|
31
31
|
import '../HelperText/index.js';
|
|
32
|
-
import '../_verture/useGlobalProps-
|
|
33
|
-
import '../_verture/index-
|
|
32
|
+
import '../_verture/useGlobalProps-1b846a65.js';
|
|
33
|
+
import '../_verture/index-be4faaee.js';
|
|
34
34
|
import 'rc-dropdown';
|
|
35
|
-
import '../_verture/usePopupContainer-
|
|
35
|
+
import '../_verture/usePopupContainer-87febeb9.js';
|
|
36
36
|
import 'dayjs';
|
|
37
|
-
import '../_verture/defineProperty-
|
|
38
|
-
import '../_verture/toConsumableArray-
|
|
37
|
+
import '../_verture/defineProperty-62acccfc.js';
|
|
38
|
+
import '../_verture/toConsumableArray-87c7d895.js';
|
|
39
39
|
import '../Empty/index.js';
|
|
40
40
|
import '@para-ui/icons/Close';
|
|
41
41
|
import '@para-ui/icons/Down';
|
|
@@ -69,68 +69,53 @@ var localeJson = {
|
|
|
69
69
|
|
|
70
70
|
var Pagination = function Pagination(props) {
|
|
71
71
|
var className = props.className,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
72
|
+
style = props.style,
|
|
73
|
+
_props$type = props.type,
|
|
74
|
+
type = _props$type === void 0 ? 'simple' : _props$type,
|
|
75
|
+
_props$autoType = props.autoType,
|
|
76
|
+
autoType = _props$autoType === void 0 ? true : _props$autoType,
|
|
77
|
+
_props$total = props.total,
|
|
78
|
+
total = _props$total === void 0 ? 0 : _props$total,
|
|
79
|
+
_props$rowsPerPage = props.rowsPerPage,
|
|
80
|
+
rowsPerPage = _props$rowsPerPage === void 0 ? [10, 20, 30] : _props$rowsPerPage,
|
|
81
|
+
_props$flippingArrow = props.flippingArrow,
|
|
82
|
+
flippingArrow = _props$flippingArrow === void 0 ? ['first', 'prev', 'last', 'next'] : _props$flippingArrow,
|
|
83
|
+
_props$currentRowsPer = props.currentRowsPerPage,
|
|
84
|
+
currentRowsPerPage = _props$currentRowsPer === void 0 ? 10 : _props$currentRowsPer,
|
|
85
|
+
_props$page = props.page,
|
|
86
|
+
page = _props$page === void 0 ? 1 : _props$page,
|
|
87
|
+
skipFunc = props.skipFunc,
|
|
88
|
+
changePage = props.changePage,
|
|
89
|
+
changeRowsPerPage = props.changeRowsPerPage,
|
|
90
|
+
getPopupContainer = props.getPopupContainer;
|
|
92
91
|
var _React$useContext = React__default.useContext(GlobalContext),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
language = _React$useContext.language,
|
|
93
|
+
locale = _React$useContext.locale;
|
|
96
94
|
var intl = useFormatMessage('Pagination', localeJson);
|
|
97
|
-
|
|
98
95
|
var _useState = useState(currentRowsPerPage),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
97
|
+
currentRowsPerPageCom = _useState2[0],
|
|
98
|
+
setCurrentRowsPerPageCom = _useState2[1]; // 当前选中每页行数
|
|
104
99
|
var _useState3 = useState([]),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
100
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
101
|
+
rowsPerPageCom = _useState4[0],
|
|
102
|
+
setRowsPerPageCom = _useState4[1]; // 每页显示的行数
|
|
110
103
|
var _useState5 = useState(page),
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
104
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
105
|
+
pageCom = _useState6[0],
|
|
106
|
+
setPageCom = _useState6[1]; // 当前页数
|
|
116
107
|
var _useState7 = useState(),
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
108
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
109
|
+
totalPage = _useState8[0],
|
|
110
|
+
setTotalPage = _useState8[1]; // 总页数
|
|
122
111
|
var _useState9 = useState(),
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
112
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
113
|
+
skipValue = _useState10[0],
|
|
114
|
+
setSkipValue = _useState10[1]; // 跳转页数
|
|
128
115
|
var _useState11 = useState(),
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
116
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
117
|
+
typeCom = _useState12[0],
|
|
118
|
+
setTypeCom = _useState12[1]; // 组件类型
|
|
134
119
|
var refDom = useRef();
|
|
135
120
|
var constData = useRef({});
|
|
136
121
|
constData.current.type = type;
|
|
@@ -148,15 +133,14 @@ var Pagination = function Pagination(props) {
|
|
|
148
133
|
}, [type]);
|
|
149
134
|
useEffect(function () {
|
|
150
135
|
setPageCom(page);
|
|
151
|
-
}, [page]);
|
|
152
|
-
|
|
136
|
+
}, [page]);
|
|
137
|
+
// 当前选中每页行数
|
|
153
138
|
useEffect(function () {
|
|
154
139
|
setCurrentRowsPerPageCom(currentRowsPerPage);
|
|
155
|
-
}, [currentRowsPerPage]);
|
|
156
|
-
|
|
140
|
+
}, [currentRowsPerPage]);
|
|
141
|
+
// 下拉页数列表
|
|
157
142
|
useEffect(function () {
|
|
158
143
|
var arr = [];
|
|
159
|
-
|
|
160
144
|
for (var i = 0, l = rowsPerPage.length; i < l; i++) {
|
|
161
145
|
var item = rowsPerPage[i];
|
|
162
146
|
var arrItem = {
|
|
@@ -165,25 +149,23 @@ var Pagination = function Pagination(props) {
|
|
|
165
149
|
};
|
|
166
150
|
arr.push(arrItem);
|
|
167
151
|
}
|
|
168
|
-
|
|
169
152
|
setRowsPerPageCom(arr);
|
|
170
153
|
}, [props.rowsPerPage]);
|
|
171
154
|
useEffect(function () {
|
|
172
155
|
var num = Number(totalPage);
|
|
173
|
-
|
|
174
156
|
if (pageCom > num && num !== pageCom) {
|
|
175
157
|
setPageCom(num);
|
|
176
158
|
}
|
|
177
159
|
}, [pageCom, totalPage]);
|
|
178
160
|
useEffect(function () {
|
|
179
|
-
var num = Math.ceil(total / currentRowsPerPageCom);
|
|
180
|
-
|
|
161
|
+
var num = Math.ceil(total / currentRowsPerPageCom);
|
|
162
|
+
// props.page 防止外部传入自定义页面,设置无效(表格分页)
|
|
181
163
|
setTotalPage(num || props.page || 1);
|
|
182
164
|
}, [currentRowsPerPageCom, total]);
|
|
183
165
|
useEffect(function () {
|
|
184
166
|
if (type === 'complex' && autoType) {
|
|
185
|
-
changeSize();
|
|
186
|
-
|
|
167
|
+
changeSize();
|
|
168
|
+
// 复杂模式,且开启自适应模式
|
|
187
169
|
window.addEventListener("resize", changeSize);
|
|
188
170
|
} else {
|
|
189
171
|
window.removeEventListener("resize", changeSize);
|
|
@@ -198,28 +180,25 @@ var Pagination = function Pagination(props) {
|
|
|
198
180
|
/**
|
|
199
181
|
* 改变了分页数据,需要判断当前是否换行了
|
|
200
182
|
* */
|
|
201
|
-
|
|
202
183
|
var changePagination = function changePagination() {
|
|
203
184
|
clearTimeout(constData.current.changePagination);
|
|
204
185
|
constData.current.changePagination = setTimeout(function () {
|
|
205
186
|
var current = refDom.current;
|
|
206
|
-
var skipDom = current && current.querySelector('.skip-page-memo');
|
|
207
|
-
|
|
187
|
+
var skipDom = current && current.querySelector('.skip-page-memo');
|
|
188
|
+
// 简单模式,不存在跳转
|
|
208
189
|
if (skipDom) {
|
|
209
190
|
// 复杂模式,换行了 -> 变成简单模式
|
|
210
191
|
if (current.offsetTop !== skipDom.offsetTop) {
|
|
211
192
|
setTypeCom('simple');
|
|
212
193
|
}
|
|
213
194
|
} else {
|
|
214
|
-
setTypeCom('complex');
|
|
215
|
-
|
|
195
|
+
setTypeCom('complex');
|
|
196
|
+
// 简单模式 -> 复杂, 需要再次判断是否换行了
|
|
216
197
|
changePagination();
|
|
217
198
|
}
|
|
218
199
|
});
|
|
219
200
|
};
|
|
220
201
|
/** 改变屏幕大小 */
|
|
221
|
-
|
|
222
|
-
|
|
223
202
|
var changeSize = function changeSize() {
|
|
224
203
|
clearTimeout(constData.current.timer);
|
|
225
204
|
clearTimeout(constData.current.timerClass);
|
|
@@ -228,19 +207,18 @@ var Pagination = function Pagination(props) {
|
|
|
228
207
|
current.classList.add($prefixCls + '-pagination-over');
|
|
229
208
|
constData.current.timer = setTimeout(function () {
|
|
230
209
|
if (!current) return;
|
|
231
|
-
var skipDom = current.querySelector('.skip-page-memo');
|
|
232
|
-
|
|
210
|
+
var skipDom = current.querySelector('.skip-page-memo');
|
|
211
|
+
// 简单模式,不存在跳转
|
|
233
212
|
if (skipDom) {
|
|
234
213
|
// 复杂模式,换行了 -> 变成简单模式
|
|
235
214
|
if (current.offsetTop !== skipDom.offsetTop) {
|
|
236
215
|
setTypeCom('simple');
|
|
237
216
|
}
|
|
238
217
|
} else {
|
|
239
|
-
setTypeCom('complex');
|
|
240
|
-
|
|
218
|
+
setTypeCom('complex');
|
|
219
|
+
// 简单模式 -> 复杂, 需要再次判断是否换行了
|
|
241
220
|
changeSize();
|
|
242
221
|
}
|
|
243
|
-
|
|
244
222
|
constData.current.timerClass = setTimeout(function () {
|
|
245
223
|
current.classList.remove($prefixCls + '-pagination-over');
|
|
246
224
|
}, 200);
|
|
@@ -249,99 +227,79 @@ var Pagination = function Pagination(props) {
|
|
|
249
227
|
/**
|
|
250
228
|
* 是否存在当前类型
|
|
251
229
|
* */
|
|
252
|
-
|
|
253
|
-
|
|
254
230
|
var notLayout = function notLayout(layout) {
|
|
255
231
|
return constData.current.type instanceof Array && constData.current.type.indexOf(layout) === -1;
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
|
|
232
|
+
};
|
|
233
|
+
// 点击分页
|
|
259
234
|
var clickPage = function clickPage(type) {
|
|
260
235
|
return function (value) {
|
|
261
236
|
var num = pageCom;
|
|
262
|
-
|
|
263
237
|
switch (type) {
|
|
264
238
|
case "first":
|
|
265
239
|
if (pageCom === 1) return;
|
|
266
240
|
num = 1;
|
|
267
241
|
break;
|
|
268
|
-
|
|
269
242
|
case "prev":
|
|
270
243
|
if (pageCom === 1) return;
|
|
271
244
|
num--;
|
|
272
245
|
break;
|
|
273
|
-
|
|
274
246
|
case "last":
|
|
275
247
|
if (pageCom === totalPage) return;
|
|
276
248
|
num = totalPage;
|
|
277
249
|
break;
|
|
278
|
-
|
|
279
250
|
case "next":
|
|
280
251
|
if (pageCom === totalPage) return;
|
|
281
252
|
num++;
|
|
282
253
|
break;
|
|
283
|
-
|
|
284
254
|
case "pagination":
|
|
285
255
|
num = value;
|
|
286
256
|
break;
|
|
287
257
|
}
|
|
288
|
-
|
|
289
258
|
if (num !== undefined) setPageCom(num);
|
|
290
259
|
changePage && changePage(num);
|
|
291
260
|
};
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
|
|
261
|
+
};
|
|
262
|
+
// 点击每页行数下拉
|
|
295
263
|
var clickRowsPerPage = function clickRowsPerPage(num) {
|
|
296
264
|
if (num === currentRowsPerPageCom) return;
|
|
297
265
|
setCurrentRowsPerPageCom(num);
|
|
298
266
|
if (changeRowsPerPage) changeRowsPerPage(num);
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
|
|
267
|
+
};
|
|
268
|
+
// 鼠标按下
|
|
302
269
|
var keyPress = function keyPress(event) {
|
|
303
270
|
var arr = ['E', 'e', '.', '-'];
|
|
304
|
-
|
|
305
271
|
if (arr.indexOf(event.key) !== -1) {
|
|
306
272
|
event.preventDefault();
|
|
307
273
|
}
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
|
|
274
|
+
};
|
|
275
|
+
// 回车事件
|
|
311
276
|
var keyUp = function keyUp(event) {
|
|
312
277
|
if (event.keyCode === 13) {
|
|
313
278
|
var num = parseInt(skipValue && skipValue.toString() || '0');
|
|
314
|
-
|
|
315
279
|
if (num <= 0) {
|
|
316
280
|
num = 1;
|
|
317
281
|
setSkipValue(num);
|
|
318
282
|
}
|
|
319
|
-
|
|
320
283
|
if (num > Number(totalPage)) {
|
|
321
284
|
num = Number(totalPage);
|
|
322
285
|
setSkipValue(num);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
286
|
+
}
|
|
287
|
+
// 回车事件
|
|
326
288
|
if (skipFunc) skipFunc(num, skipValue);
|
|
327
289
|
setPageCom(num);
|
|
328
290
|
changePage && changePage(num);
|
|
329
291
|
}
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
|
|
292
|
+
};
|
|
293
|
+
// 改变输入框
|
|
333
294
|
var changeSkipValue = function changeSkipValue(event) {
|
|
334
295
|
setSkipValue(event.target.value);
|
|
335
296
|
};
|
|
336
297
|
/* 总数量 */
|
|
337
|
-
|
|
338
|
-
|
|
339
298
|
var TotalMemo = useMemo(function () {
|
|
340
299
|
if (typeCom === 'simple' || notLayout('sizes')) {
|
|
341
300
|
return null;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
|
|
301
|
+
}
|
|
302
|
+
// 共{total}条
|
|
345
303
|
return jsx("div", Object.assign({
|
|
346
304
|
className: "total-num pagination-space"
|
|
347
305
|
}, {
|
|
@@ -353,12 +311,10 @@ var Pagination = function Pagination(props) {
|
|
|
353
311
|
}));
|
|
354
312
|
}, [total, language, locale, typeCom]);
|
|
355
313
|
/* 每页行数 */
|
|
356
|
-
|
|
357
314
|
var PageLineMemo = useMemo(function () {
|
|
358
315
|
if (notLayout('pageRow')) {
|
|
359
316
|
return null;
|
|
360
317
|
}
|
|
361
|
-
|
|
362
318
|
return jsxs("div", Object.assign({
|
|
363
319
|
className: "page-line-memo pagination-space"
|
|
364
320
|
}, {
|
|
@@ -379,12 +335,10 @@ var Pagination = function Pagination(props) {
|
|
|
379
335
|
}));
|
|
380
336
|
}, [rowsPerPageCom, currentRowsPerPageCom, getPopupContainer, language, locale, typeCom]);
|
|
381
337
|
/* 当前页面 */
|
|
382
|
-
|
|
383
338
|
var CurrentPageMemo = useMemo(function () {
|
|
384
339
|
if (notLayout('currentPage')) {
|
|
385
340
|
return null;
|
|
386
341
|
}
|
|
387
|
-
|
|
388
342
|
var html = jsxs(Fragment, {
|
|
389
343
|
children: [jsx("span", Object.assign({
|
|
390
344
|
className: "current-page-num"
|
|
@@ -400,7 +354,6 @@ var Pagination = function Pagination(props) {
|
|
|
400
354
|
children: totalPage
|
|
401
355
|
}))]
|
|
402
356
|
});
|
|
403
|
-
|
|
404
357
|
return jsx("div", Object.assign({
|
|
405
358
|
className: "current-page pagination-space"
|
|
406
359
|
}, {
|
|
@@ -412,12 +365,10 @@ var Pagination = function Pagination(props) {
|
|
|
412
365
|
}));
|
|
413
366
|
}, [pageCom, totalPage, language, locale, typeCom]);
|
|
414
367
|
/* 页码 */
|
|
415
|
-
|
|
416
368
|
var PaginationMemo = useMemo(function () {
|
|
417
369
|
if (notLayout('pager')) {
|
|
418
370
|
return null;
|
|
419
371
|
}
|
|
420
|
-
|
|
421
372
|
var bol = constData.current.type instanceof Array && constData.current.type.indexOf('pager') !== -1;
|
|
422
373
|
return jsxs("div", Object.assign({
|
|
423
374
|
className: "pagination-content pagination-space"
|
|
@@ -463,12 +414,10 @@ var Pagination = function Pagination(props) {
|
|
|
463
414
|
}));
|
|
464
415
|
}, [total, pageCom, totalPage, currentRowsPerPageCom, typeCom, props.flippingArrow]);
|
|
465
416
|
/* 跳转页数 */
|
|
466
|
-
|
|
467
417
|
var SkipPageMemo = useMemo(function () {
|
|
468
418
|
if (typeCom === 'simple' || notLayout('jumper')) {
|
|
469
419
|
return null;
|
|
470
420
|
}
|
|
471
|
-
|
|
472
421
|
return jsxs("div", Object.assign({
|
|
473
422
|
className: "skip-page-memo pagination-space"
|
|
474
423
|
}, {
|
|
@@ -490,8 +439,8 @@ var Pagination = function Pagination(props) {
|
|
|
490
439
|
onKeyUp: keyUp
|
|
491
440
|
})]
|
|
492
441
|
}));
|
|
493
|
-
}, [skipValue, totalPage, language, locale, typeCom]);
|
|
494
|
-
|
|
442
|
+
}, [skipValue, totalPage, language, locale, typeCom]);
|
|
443
|
+
// 处理class
|
|
495
444
|
var handClass = function handClass() {
|
|
496
445
|
var str = $prefixCls + '-pagination';
|
|
497
446
|
if (flippingArrow.indexOf('first') === -1 && flippingArrow.indexOf('prev') === -1) str += ' ' + $prefixCls + '-pagination-no-left-arrow';
|
|
@@ -499,7 +448,6 @@ var Pagination = function Pagination(props) {
|
|
|
499
448
|
if (className) str += ' ' + className;
|
|
500
449
|
return str;
|
|
501
450
|
};
|
|
502
|
-
|
|
503
451
|
return jsxs("div", Object.assign({
|
|
504
452
|
className: handClass(),
|
|
505
453
|
style: style,
|
package/ParauiProvider/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_verture/defineProperty-
|
|
1
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-62acccfc.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import GlobalContext, { changeConfirmLocale } from '@para-ui/core/GlobalContext';
|
|
5
5
|
import { GetLanguage } from '@paraview/lib';
|
|
6
|
-
import { i as i18nIntl } from '../_verture/intl-
|
|
6
|
+
import { i as i18nIntl } from '../_verture/intl-5cbb940c.js';
|
|
7
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
8
|
import '../_verture/typeof-498dd2b1.js';
|
|
9
9
|
|
|
@@ -32,7 +32,6 @@ var ParauiProvider = function ParauiProvider(props) {
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
|
|
36
35
|
React__default.useEffect(function () {
|
|
37
36
|
// Confirm 国际化
|
|
38
37
|
var lang = props.language || GetLanguage();
|
package/PasswordRules/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
2
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
3
3
|
import CheckCircle from '@para-ui/icons/CheckCircle';
|
|
4
4
|
import CompleteIcon from '@para-ui/icons/CheckCircleF';
|
|
5
5
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
@@ -9,28 +9,23 @@ styleInject(css_248z);
|
|
|
9
9
|
|
|
10
10
|
var PasswordRules = function PasswordRules(props) {
|
|
11
11
|
var className = props.className,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
style = props.style,
|
|
13
|
+
_props$boxShadow = props.boxShadow,
|
|
14
|
+
boxShadow = _props$boxShadow === void 0 ? false : _props$boxShadow,
|
|
15
|
+
value = props.value,
|
|
16
|
+
config = props.config;
|
|
18
17
|
var handConfig = function handConfig() {
|
|
19
18
|
if (!config) return [];
|
|
20
19
|
return config instanceof Array ? config : [config];
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
var configCom = handConfig();
|
|
24
22
|
/** 处理每一项 */
|
|
25
|
-
|
|
26
23
|
var handContentItem = function handContentItem(item) {
|
|
27
24
|
var list = item.list || [];
|
|
28
25
|
var type = item.type || 'icon';
|
|
29
|
-
|
|
30
26
|
var handRuleItem = function handRuleItem(listItem, inx) {
|
|
31
27
|
// 判断校验
|
|
32
28
|
var result;
|
|
33
|
-
|
|
34
29
|
if (value !== undefined) {
|
|
35
30
|
// 正则
|
|
36
31
|
if (listItem.reg) {
|
|
@@ -40,43 +35,34 @@ var PasswordRules = function PasswordRules(props) {
|
|
|
40
35
|
console.log(e);
|
|
41
36
|
}
|
|
42
37
|
}
|
|
43
|
-
|
|
44
38
|
if (listItem.validator) {
|
|
45
39
|
result = listItem.validator(listItem, value);
|
|
46
40
|
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
}
|
|
42
|
+
// 处理标志
|
|
50
43
|
var handFlag = function handFlag() {
|
|
51
44
|
if (type === 'order') {
|
|
52
45
|
return inx + 1 + '、';
|
|
53
46
|
}
|
|
54
|
-
|
|
55
47
|
if (result === true) return jsx(CompleteIcon, {}); // 成功
|
|
56
|
-
|
|
57
48
|
return jsx(CheckCircle, {});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
|
|
49
|
+
};
|
|
50
|
+
// 处理内容
|
|
61
51
|
var handLabel = function handLabel() {
|
|
62
52
|
if (typeof result !== "boolean" && result) return result;
|
|
63
53
|
return listItem.label;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
|
|
54
|
+
};
|
|
55
|
+
// 处理样式
|
|
67
56
|
var handClassRulesItem = function handClassRulesItem() {
|
|
68
57
|
var str = 'rules-item-detail';
|
|
69
58
|
str += ' rules-item-detail-' + type;
|
|
70
|
-
|
|
71
59
|
if (typeof result === "boolean" && result) {
|
|
72
60
|
str += ' rules-item-detail-success';
|
|
73
61
|
} else {
|
|
74
62
|
if (result !== undefined) str += ' rules-item-detail-error';
|
|
75
63
|
}
|
|
76
|
-
|
|
77
64
|
return str;
|
|
78
65
|
};
|
|
79
|
-
|
|
80
66
|
return jsxs("div", Object.assign({
|
|
81
67
|
className: handClassRulesItem()
|
|
82
68
|
}, {
|
|
@@ -91,7 +77,6 @@ var PasswordRules = function PasswordRules(props) {
|
|
|
91
77
|
}))]
|
|
92
78
|
}), inx);
|
|
93
79
|
};
|
|
94
|
-
|
|
95
80
|
return jsx("div", Object.assign({
|
|
96
81
|
className: "password-rules-item-content"
|
|
97
82
|
}, {
|
|
@@ -101,15 +86,12 @@ var PasswordRules = function PasswordRules(props) {
|
|
|
101
86
|
}));
|
|
102
87
|
};
|
|
103
88
|
/** 处理className */
|
|
104
|
-
|
|
105
|
-
|
|
106
89
|
var handClass = function handClass() {
|
|
107
90
|
var str = $prefixCls + '-password-rules';
|
|
108
91
|
if (className) str += ' ' + className;
|
|
109
92
|
if (boxShadow) str += ' ' + $prefixCls + '-password-rules-box-shadow';
|
|
110
93
|
return str;
|
|
111
94
|
};
|
|
112
|
-
|
|
113
95
|
return jsx("div", Object.assign({
|
|
114
96
|
className: handClass(),
|
|
115
97
|
style: style
|
package/PopConfirm/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import React, { FunctionComponent, ReactNode } from 'react';
|
|
|
7
7
|
import { ButtonProps } from "../Button";
|
|
8
8
|
import { TooltipProps } from "../Tooltip";
|
|
9
9
|
import './index.scss';
|
|
10
|
-
|
|
10
|
+
type ConfirmType = "success" | "info" | "error" | "warning";
|
|
11
11
|
export interface PopConfirmProps {
|
|
12
12
|
/**触发方式*/
|
|
13
13
|
trigger?: 'click' | 'hover';
|