@para-ui/core 4.0.0-rc.4 → 4.0.0-rc.5
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 +72 -85
- package/AutoTips/index.js +72 -95
- package/Badge/index.js +17 -16
- package/Breadcrumbs/index.js +57 -73
- package/Button/index.js +89 -117
- package/ButtonGroup/index.js +30 -33
- package/Carousel/index.js +29 -33
- package/Cascader/index.js +7 -9
- package/Checkbox/index.js +28 -35
- package/CheckboxGroup/index.js +43 -58
- package/Collapse/index.js +52 -49
- package/CollapseBox/index.js +65 -70
- package/CollapseLayout/index.js +106 -101
- package/ColorPicker/index.js +3 -3
- package/ComboSelect/index.js +242 -330
- package/Container/index.js +17 -21
- package/CopyText/index.js +50 -83
- package/DatePicker/index.js +22 -27
- package/Descriptions/index.js +50 -59
- package/Desktop/index.js +161 -180
- package/DragVerify/index.js +77 -113
- package/Drawer/index.js +80 -95
- package/Dropdown/index.js +3 -3
- package/DynamicMultiBox/index.js +219 -224
- package/DynamicMultiBox/interface.d.ts +7 -0
- package/Empty/index.js +26 -28
- package/Form/index.js +66 -74
- package/FormItem/index.js +14 -15
- package/FunctionModal/index.js +7 -14
- package/GlobalContext/index.js +17 -20
- package/Help/index.js +9 -12
- package/HelperText/index.js +11 -11
- package/InputLang/index.js +104 -124
- package/InputNumber/index.js +62 -81
- package/Label/index.js +19 -21
- package/Loading/index.js +11 -10
- package/Menu/index.js +302 -371
- package/Message/index.js +104 -113
- package/Modal/index.js +122 -148
- package/MultiBox/index.d.ts +5 -0
- package/MultiBox/index.js +111 -115
- package/Notification/index.js +105 -103
- package/OperateBtn/index.d.ts +3 -0
- package/OperateBtn/index.js +77 -107
- package/PageHeader/index.js +327 -406
- package/Pagination/index.js +107 -137
- package/ParauiProvider/index.js +20 -22
- package/PasswordRules/index.js +36 -40
- package/PopConfirm/index.js +60 -77
- package/Popover/index.js +12 -12
- package/Progress/index.js +72 -74
- package/Querying/index.js +22 -23
- package/README.md +2 -0
- package/Radio/index.js +27 -34
- package/RadioGroup/index.js +38 -52
- package/Search/index.js +34 -43
- package/Select/index.js +281 -345
- package/SelectInput/index.js +8 -13
- package/Selector/index.js +905 -796
- package/SelectorPicker/index.js +111 -133
- package/SingleBox/index.d.ts +5 -0
- package/SingleBox/index.js +92 -88
- package/Slider/index.js +46 -57
- package/Status/index.js +14 -13
- package/Stepper/index.js +25 -26
- package/Styles/theme.scss +9 -9
- package/Switch/index.js +32 -35
- package/Table/index.js +767 -963
- package/Tabs/index.js +102 -102
- package/Tag/index.js +115 -162
- package/TextEditor/index.js +81 -103
- package/TextField/index.js +142 -183
- package/TimePicker/index.js +27 -28
- package/Timeline/index.js +67 -58
- package/Title/index.js +32 -34
- package/ToggleButton/index.js +53 -52
- package/Tooltip/index.js +79 -82
- package/Transfer/index.js +159 -201
- package/Tree/index.js +7 -12
- package/Upload/index.js +523 -758
- package/Upload/interface.d.ts +2 -0
- package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
- package/_verture/{index-5a7e2438.js → index-0ced30f7.js} +1127 -1079
- package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
- package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
- package/_verture/index-da9097d3.js +239 -0
- package/_verture/{index-9331b116.js → index-ef1235fb.js} +125 -134
- package/_verture/{index-b1f80962.js → index-f186b5e8.js} +314 -398
- package/_verture/intl-f2f27722.js +69 -0
- package/_verture/{modalContext-736ff215.js → modalContext-5df08980.js} +36 -64
- package/_verture/{slicedToArray-a8206399.js → slicedToArray-8223a2ef.js} +15 -2
- package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
- package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
- package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
- package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
- package/_verture/{utils-418da0a4.js → utils-46e99c9a.js} +34 -25
- package/index.js +21 -22
- package/locale/index.js +6 -6
- package/package.json +1 -1
- package/umd/AutoBox.js +9 -8
- package/umd/AutoTips.js +9 -8
- package/umd/Badge.js +1 -1
- package/umd/Breadcrumbs.js +9 -8
- package/umd/Button.js +9 -8
- package/umd/ButtonGroup.js +9 -8
- package/umd/Carousel.js +5 -5
- package/umd/Cascader.js +9 -8
- package/umd/Checkbox.js +9 -8
- package/umd/CheckboxGroup.js +9 -8
- package/umd/Collapse.js +8 -7
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +9 -8
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +9 -8
- package/umd/DatePicker.js +9 -8
- package/umd/Descriptions.js +9 -8
- package/umd/Desktop.js +9 -8
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +9 -8
- package/umd/Dropdown.js +6 -5
- package/umd/DynamicMultiBox.js +11 -10
- package/umd/Empty.js +1 -1
- package/umd/Form.js +9 -8
- package/umd/FormItem.js +9 -8
- package/umd/FunctionModal.js +9 -8
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +9 -8
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +9 -8
- package/umd/InputNumber.js +9 -8
- package/umd/Label.js +9 -8
- package/umd/Loading.js +4 -4
- package/umd/Menu.js +4 -4
- package/umd/Message.js +4 -4
- package/umd/Modal.js +9 -8
- package/umd/MultiBox.js +9 -8
- package/umd/Notification.js +8 -7
- package/umd/OperateBtn.js +9 -8
- package/umd/PageHeader.js +9 -8
- package/umd/Pagination.js +9 -8
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +9 -8
- package/umd/Popover.js +9 -8
- package/umd/Progress.js +5 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +9 -8
- package/umd/RadioGroup.js +9 -8
- package/umd/Search.js +9 -8
- package/umd/Select.js +9 -8
- package/umd/SelectInput.js +9 -8
- package/umd/Selector.js +9 -8
- package/umd/SelectorPicker.js +9 -8
- package/umd/SingleBox.js +9 -8
- package/umd/Slider.js +6 -5
- package/umd/Status.js +4 -4
- package/umd/Stepper.js +9 -8
- package/umd/Switch.js +9 -8
- package/umd/Table.js +9 -8
- package/umd/Tabs.js +9 -8
- package/umd/Tag.js +9 -8
- package/umd/TextEditor.js +22 -21
- package/umd/TextField.js +9 -8
- package/umd/TimePicker.js +9 -8
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +9 -8
- package/umd/ToggleButton.js +9 -8
- package/umd/Tooltip.js +9 -8
- package/umd/Transfer.js +10 -9
- package/umd/Tree.js +9 -8
- package/umd/Upload.js +10 -9
- package/umd/locale.js +1 -1
- package/_verture/index-232d890b.js +0 -327
- package/_verture/index-e9007d6a.js +0 -236
- package/_verture/intl-5c1ec055.js +0 -81
- package/_verture/toConsumableArray-8f4c9589.js +0 -19
- package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
package/Pagination/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
2
|
import React__default, { useState, useRef, useEffect, useMemo } from 'react';
|
|
4
3
|
import GlobalContext from '@para-ui/core/GlobalContext';
|
|
5
|
-
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-
|
|
4
|
+
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-5317fc89.js';
|
|
6
5
|
import { TextField } from '../TextField/index.js';
|
|
7
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
6
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
|
|
8
7
|
import Select from '../Select/index.js';
|
|
9
8
|
import { Button } from '../Button/index.js';
|
|
10
9
|
import NavigateBefore from '@para-ui/icons/Left';
|
|
@@ -13,8 +12,6 @@ import Right from '@para-ui/icons/Right';
|
|
|
13
12
|
import DoubleLeft from '@para-ui/icons/DoubleLeft';
|
|
14
13
|
import DoubleRight from '@para-ui/icons/DoubleRight';
|
|
15
14
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
16
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
17
|
-
import '../_verture/typeof-adeedc13.js';
|
|
18
15
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
19
16
|
import '../Label/index.js';
|
|
20
17
|
import '../Help/index.js';
|
|
@@ -32,13 +29,11 @@ import '../AutoTips/index.js';
|
|
|
32
29
|
import '../Loading/index.js';
|
|
33
30
|
import '@para-ui/icons/LoadingF';
|
|
34
31
|
import '../HelperText/index.js';
|
|
35
|
-
import '../_verture/useGlobalProps-
|
|
36
|
-
import '../_verture/index-
|
|
32
|
+
import '../_verture/useGlobalProps-1e416658.js';
|
|
33
|
+
import '../_verture/index-da9097d3.js';
|
|
37
34
|
import 'rc-dropdown';
|
|
38
|
-
import '../_verture/usePopupContainer-
|
|
35
|
+
import '../_verture/usePopupContainer-635f66f4.js';
|
|
39
36
|
import 'dayjs';
|
|
40
|
-
import '../_verture/defineProperty-1d116156.js';
|
|
41
|
-
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
42
37
|
import '../Empty/index.js';
|
|
43
38
|
import '@para-ui/icons/Close';
|
|
44
39
|
import '@para-ui/icons/Down';
|
|
@@ -65,92 +60,69 @@ var zh = {
|
|
|
65
60
|
};
|
|
66
61
|
|
|
67
62
|
var localeJson = {
|
|
68
|
-
zh
|
|
69
|
-
en
|
|
63
|
+
zh,
|
|
64
|
+
en
|
|
70
65
|
};
|
|
71
66
|
|
|
72
67
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/10/26 13:57\n* @description 分页样式\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-pagination {\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 color: rgb(29, 33, 38);\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n opacity: 1;\n}\n.paraui-v4-pagination.paraui-v4-pagination-over {\n overflow: hidden;\n height: 32px;\n opacity: 0;\n transition: all 0.3s;\n}\n.paraui-v4-pagination.paraui-v4-pagination-no-left-arrow > .pagination-content {\n padding-left: 0;\n}\n.paraui-v4-pagination.paraui-v4-pagination-no-right-arrow > .pagination-content {\n padding-right: 0;\n}\n.paraui-v4-pagination > .pagination-space {\n margin-right: 10px;\n}\n.paraui-v4-pagination > .pagination-space:last-child {\n margin-right: 0;\n}\n.paraui-v4-pagination > .pagination-content {\n border-radius: 4px;\n height: 32px;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-pagination > .pagination-content > .left-page, .paraui-v4-pagination > .pagination-content > .right-page {\n display: inline-block;\n}\n.paraui-v4-pagination > .pagination-content > .left-page > div, .paraui-v4-pagination > .pagination-content > .right-page > div {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n width: 32px;\n height: 32px;\n border-radius: 4px;\n}\n.paraui-v4-pagination > .pagination-content > .left-page > div.disabled-btn, .paraui-v4-pagination > .pagination-content > .right-page > div.disabled-btn {\n cursor: not-allowed;\n}\n.paraui-v4-pagination > .pagination-content > .left-page > div.disabled-btn > svg, .paraui-v4-pagination > .pagination-content > .right-page > div.disabled-btn > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-pagination > .pagination-content > .left-page > div.disabled-btn:hover, .paraui-v4-pagination > .pagination-content > .right-page > div.disabled-btn:hover {\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-pagination > .pagination-content > .left-page > div.disabled-btn:hover > svg, .paraui-v4-pagination > .pagination-content > .right-page > div.disabled-btn:hover > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-pagination > .pagination-content > .left-page > div:last-child, .paraui-v4-pagination > .pagination-content > .right-page > div:last-child {\n margin-right: 0;\n}\n.paraui-v4-pagination > .pagination-content > .left-page > div:hover, .paraui-v4-pagination > .pagination-content > .right-page > div:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-pagination > .pagination-content > .left-page > div:hover > svg, .paraui-v4-pagination > .pagination-content > .right-page > div:hover > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-pagination > .pagination-content > .left-page > div > svg, .paraui-v4-pagination > .pagination-content > .right-page > div > svg {\n font-size: 16px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination {\n height: 100%;\n display: inline-block;\n box-shadow: none;\n vertical-align: top;\n line-height: 30px;\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li {\n min-width: 32px;\n height: 32px;\n line-height: 32px;\n display: inline-block;\n text-align: center;\n cursor: pointer;\n border-radius: 4px;\n margin-right: 6px;\n padding: 0 6px;\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li:first-child, .paraui-v4-pagination > .pagination-content > .component-pagination > li:last-child, .paraui-v4-pagination > .pagination-content > .component-pagination > li.component-pagination-next {\n display: none;\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li.component-pagination-jump-next, .paraui-v4-pagination > .pagination-content > .component-pagination > li.component-pagination-jump-prev {\n padding: 0;\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li > .jump-prev-icon svg, .paraui-v4-pagination > .pagination-content > .component-pagination > li > .jump-next-icon svg {\n display: none;\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li > .jump-prev-icon span, .paraui-v4-pagination > .pagination-content > .component-pagination > li > .jump-next-icon span {\n display: inline-block;\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li > .jump-prev-icon:hover svg, .paraui-v4-pagination > .pagination-content > .component-pagination > li > .jump-next-icon:hover svg {\n display: inline-block;\n vertical-align: middle;\n color: rgb(46, 101, 230);\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li > .jump-prev-icon:hover span, .paraui-v4-pagination > .pagination-content > .component-pagination > li > .jump-next-icon:hover span {\n display: none;\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li:hover {\n background-color: rgb(247, 248, 250);\n color: rgb(46, 101, 230);\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li.component-pagination-item-active {\n color: rgb(46, 101, 230);\n border: 1px solid;\n border-color: rgb(46, 101, 230);\n line-height: 30px;\n}\n.paraui-v4-pagination > .pagination-content > .component-pagination > li.component-pagination-item-active:hover {\n background: rgb(255, 255, 255);\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-pagination > .pagination-btn-content button:first-child {\n margin-right: 10px;\n}\n.paraui-v4-pagination > .page-line-memo > span {\n display: inline-block;\n margin-right: 8px;\n vertical-align: middle;\n}\n.paraui-v4-pagination > .page-line-memo .page-line-select {\n width: 110px;\n vertical-align: middle;\n}\n.paraui-v4-pagination > .skip-page-memo {\n display: flex;\n align-items: center;\n}\n.paraui-v4-pagination > .skip-page-memo > span {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-pagination > .skip-page-memo > .skip-page-text-field {\n width: 50px;\n margin: 0 4px;\n}\n.paraui-v4-pagination > .skip-page-memo > .skip-page-text-field .right-icon {\n margin-right: 8px;\n}";
|
|
73
68
|
styleInject(css_248z);
|
|
74
69
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
type =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
setCurrentRowsPerPageCom = _useState2[1]; // 当前选中每页行数
|
|
106
|
-
var _useState3 = useState([]),
|
|
107
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
108
|
-
rowsPerPageCom = _useState4[0],
|
|
109
|
-
setRowsPerPageCom = _useState4[1]; // 每页显示的行数
|
|
110
|
-
var _useState5 = useState(page),
|
|
111
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
112
|
-
pageCom = _useState6[0],
|
|
113
|
-
setPageCom = _useState6[1]; // 当前页数
|
|
114
|
-
var _useState7 = useState(),
|
|
115
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
116
|
-
totalPage = _useState8[0],
|
|
117
|
-
setTotalPage = _useState8[1]; // 总页数
|
|
118
|
-
var _useState9 = useState(),
|
|
119
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
120
|
-
skipValue = _useState10[0],
|
|
121
|
-
setSkipValue = _useState10[1]; // 跳转页数
|
|
122
|
-
var _useState11 = useState(),
|
|
123
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
124
|
-
typeCom = _useState12[0],
|
|
125
|
-
setTypeCom = _useState12[1]; // 组件类型
|
|
126
|
-
var refDom = useRef();
|
|
127
|
-
var constData = useRef({});
|
|
70
|
+
const Pagination = props => {
|
|
71
|
+
const {
|
|
72
|
+
className,
|
|
73
|
+
style,
|
|
74
|
+
type = 'simple',
|
|
75
|
+
pagerType = 'num',
|
|
76
|
+
autoType = true,
|
|
77
|
+
total = 0,
|
|
78
|
+
rowsPerPage = [10, 20, 50, 100],
|
|
79
|
+
flippingArrow = ['prev', 'next'],
|
|
80
|
+
currentRowsPerPage = 10,
|
|
81
|
+
page = 1,
|
|
82
|
+
skipFunc,
|
|
83
|
+
changePage,
|
|
84
|
+
changeRowsPerPage,
|
|
85
|
+
getPopupContainer
|
|
86
|
+
} = props;
|
|
87
|
+
const {
|
|
88
|
+
language,
|
|
89
|
+
locale
|
|
90
|
+
} = React__default.useContext(GlobalContext);
|
|
91
|
+
const intl = useFormatMessage('Pagination', localeJson);
|
|
92
|
+
const [currentRowsPerPageCom, setCurrentRowsPerPageCom] = useState(currentRowsPerPage); // 当前选中每页行数
|
|
93
|
+
const [rowsPerPageCom, setRowsPerPageCom] = useState([]); // 每页显示的行数
|
|
94
|
+
const [pageCom, setPageCom] = useState(page); // 当前页数
|
|
95
|
+
const [totalPage, setTotalPage] = useState(); // 总页数
|
|
96
|
+
const [skipValue, setSkipValue] = useState(); // 跳转页数
|
|
97
|
+
const [typeCom, setTypeCom] = useState(); // 组件类型
|
|
98
|
+
const refDom = useRef();
|
|
99
|
+
const constData = useRef({});
|
|
128
100
|
constData.current.type = type;
|
|
129
101
|
constData.current.autoType = autoType;
|
|
130
|
-
useEffect(
|
|
131
|
-
return
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
return () => {
|
|
132
104
|
window.removeEventListener('resize', changeSize);
|
|
133
105
|
clearTimeout(constData.current.timer);
|
|
134
106
|
clearTimeout(constData.current.timerClass);
|
|
135
107
|
clearTimeout(constData.current.changePagination);
|
|
136
108
|
};
|
|
137
109
|
}, []);
|
|
138
|
-
useEffect(
|
|
110
|
+
useEffect(() => {
|
|
139
111
|
setTypeCom(type);
|
|
140
112
|
}, [type]);
|
|
141
|
-
useEffect(
|
|
113
|
+
useEffect(() => {
|
|
142
114
|
setPageCom(page);
|
|
143
115
|
}, [page]);
|
|
144
116
|
// 当前选中每页行数
|
|
145
|
-
useEffect(
|
|
117
|
+
useEffect(() => {
|
|
146
118
|
setCurrentRowsPerPageCom(currentRowsPerPage);
|
|
147
119
|
}, [currentRowsPerPage]);
|
|
148
120
|
// 下拉页数列表
|
|
149
|
-
useEffect(
|
|
150
|
-
|
|
151
|
-
for (
|
|
152
|
-
|
|
153
|
-
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
const arr = [];
|
|
123
|
+
for (let i = 0, l = rowsPerPage.length; i < l; i++) {
|
|
124
|
+
const item = rowsPerPage[i];
|
|
125
|
+
const arrItem = {
|
|
154
126
|
label: item.toString() + intl({
|
|
155
127
|
id: 'barPage'
|
|
156
128
|
}),
|
|
@@ -160,18 +132,18 @@ var Pagination = function Pagination(props) {
|
|
|
160
132
|
}
|
|
161
133
|
setRowsPerPageCom(arr);
|
|
162
134
|
}, [props.rowsPerPage, locale]);
|
|
163
|
-
useEffect(
|
|
164
|
-
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
const num = Number(totalPage);
|
|
165
137
|
if (pageCom > num && num !== pageCom) {
|
|
166
138
|
setPageCom(num);
|
|
167
139
|
}
|
|
168
140
|
}, [pageCom, totalPage]);
|
|
169
|
-
useEffect(
|
|
170
|
-
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
const num = Math.ceil(total / currentRowsPerPageCom);
|
|
171
143
|
// props.page 防止外部传入自定义页面,设置无效(表格分页)
|
|
172
144
|
setTotalPage(num || props.page || 1);
|
|
173
145
|
}, [currentRowsPerPageCom, total]);
|
|
174
|
-
useEffect(
|
|
146
|
+
useEffect(() => {
|
|
175
147
|
if (type === 'complex' && autoType) {
|
|
176
148
|
changeSize();
|
|
177
149
|
// 复杂模式,且开启自适应模式
|
|
@@ -181,7 +153,7 @@ var Pagination = function Pagination(props) {
|
|
|
181
153
|
setTypeCom(type);
|
|
182
154
|
}
|
|
183
155
|
}, [type, autoType]);
|
|
184
|
-
useEffect(
|
|
156
|
+
useEffect(() => {
|
|
185
157
|
if (constData.current.type === 'complex' && constData.current.autoType) {
|
|
186
158
|
changePagination();
|
|
187
159
|
}
|
|
@@ -189,11 +161,11 @@ var Pagination = function Pagination(props) {
|
|
|
189
161
|
/**
|
|
190
162
|
* 改变了分页数据,需要判断当前是否换行了
|
|
191
163
|
* */
|
|
192
|
-
|
|
164
|
+
const changePagination = () => {
|
|
193
165
|
clearTimeout(constData.current.changePagination);
|
|
194
|
-
constData.current.changePagination = setTimeout(
|
|
195
|
-
|
|
196
|
-
|
|
166
|
+
constData.current.changePagination = setTimeout(() => {
|
|
167
|
+
const current = refDom.current;
|
|
168
|
+
const skipDom = current && current.querySelector('.skip-page-memo');
|
|
197
169
|
// 简单模式,不存在跳转
|
|
198
170
|
if (skipDom) {
|
|
199
171
|
// 复杂模式,换行了 -> 变成简单模式
|
|
@@ -208,16 +180,16 @@ var Pagination = function Pagination(props) {
|
|
|
208
180
|
});
|
|
209
181
|
};
|
|
210
182
|
/** 改变屏幕大小 */
|
|
211
|
-
|
|
183
|
+
const changeSize = () => {
|
|
212
184
|
clearTimeout(constData.current.timer);
|
|
213
185
|
clearTimeout(constData.current.timerClass);
|
|
214
|
-
|
|
186
|
+
const current = refDom.current;
|
|
215
187
|
if (!current) return;
|
|
216
188
|
current.classList.add("".concat($prefixCls, "-pagination-over"));
|
|
217
|
-
constData.current.timer = setTimeout(
|
|
189
|
+
constData.current.timer = setTimeout(() => {
|
|
218
190
|
if (!current) return;
|
|
219
|
-
|
|
220
|
-
|
|
191
|
+
const moduleDom = current.querySelector('.pagination-content');
|
|
192
|
+
const skipDom = current.querySelector('.skip-page-memo');
|
|
221
193
|
// 简单模式,不存在跳转
|
|
222
194
|
if (moduleDom) {
|
|
223
195
|
// 复杂模式,换行了 -> 变成简单模式
|
|
@@ -229,7 +201,7 @@ var Pagination = function Pagination(props) {
|
|
|
229
201
|
// 简单模式 -> 复杂, 需要再次判断是否换行了
|
|
230
202
|
changeSize();
|
|
231
203
|
}
|
|
232
|
-
constData.current.timerClass = setTimeout(
|
|
204
|
+
constData.current.timerClass = setTimeout(() => {
|
|
233
205
|
current.classList.remove("".concat($prefixCls, "-pagination-over"));
|
|
234
206
|
}, 200);
|
|
235
207
|
}, 200);
|
|
@@ -237,55 +209,53 @@ var Pagination = function Pagination(props) {
|
|
|
237
209
|
/**
|
|
238
210
|
* 是否存在当前类型
|
|
239
211
|
* */
|
|
240
|
-
|
|
212
|
+
const notLayout = layout => {
|
|
241
213
|
return constData.current.type instanceof Array && constData.current.type.indexOf(layout) === -1;
|
|
242
214
|
};
|
|
243
215
|
// 点击分页
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
changePage && changePage(num);
|
|
270
|
-
};
|
|
216
|
+
const clickPage = type => value => {
|
|
217
|
+
let num = pageCom;
|
|
218
|
+
switch (type) {
|
|
219
|
+
/*case "first":
|
|
220
|
+
if (pageCom === 1) return;
|
|
221
|
+
num = 1;
|
|
222
|
+
break;*/
|
|
223
|
+
case 'prev':
|
|
224
|
+
if (pageCom === 1) return;
|
|
225
|
+
num--;
|
|
226
|
+
break;
|
|
227
|
+
/*case "last":
|
|
228
|
+
if (pageCom === totalPage) return;
|
|
229
|
+
num = totalPage;
|
|
230
|
+
break;*/
|
|
231
|
+
case 'next':
|
|
232
|
+
if (pageCom === totalPage) return;
|
|
233
|
+
num++;
|
|
234
|
+
break;
|
|
235
|
+
case 'pagination':
|
|
236
|
+
num = value;
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
if (num !== undefined) setPageCom(num);
|
|
240
|
+
changePage && changePage(num);
|
|
271
241
|
};
|
|
272
242
|
// 点击每页行数下拉
|
|
273
|
-
|
|
243
|
+
const clickRowsPerPage = num => {
|
|
274
244
|
if (num === currentRowsPerPageCom) return;
|
|
275
245
|
setCurrentRowsPerPageCom(num);
|
|
276
246
|
if (changeRowsPerPage) changeRowsPerPage(num);
|
|
277
247
|
};
|
|
278
248
|
// 鼠标按下
|
|
279
|
-
|
|
280
|
-
|
|
249
|
+
const keyPress = event => {
|
|
250
|
+
const arr = ['E', 'e', '.', '-'];
|
|
281
251
|
if (arr.indexOf(event.key) !== -1) {
|
|
282
252
|
event.preventDefault();
|
|
283
253
|
}
|
|
284
254
|
};
|
|
285
255
|
// 回车事件
|
|
286
|
-
|
|
256
|
+
const keyUp = event => {
|
|
287
257
|
if (event.keyCode === 13) {
|
|
288
|
-
|
|
258
|
+
let num = parseInt(skipValue && skipValue.toString() || '0');
|
|
289
259
|
if (num <= 0) {
|
|
290
260
|
num = 1;
|
|
291
261
|
setSkipValue(num);
|
|
@@ -301,20 +271,20 @@ var Pagination = function Pagination(props) {
|
|
|
301
271
|
}
|
|
302
272
|
};
|
|
303
273
|
// 改变输入框
|
|
304
|
-
|
|
274
|
+
const changeSkipValue = event => {
|
|
305
275
|
setSkipValue(event.target.value);
|
|
306
276
|
};
|
|
307
|
-
|
|
308
|
-
|
|
277
|
+
const formatNumber = num => {
|
|
278
|
+
const reg = /(?=(\B)(\d{3})+$)/g;
|
|
309
279
|
return num.toString().replace(reg, ',');
|
|
310
280
|
};
|
|
311
281
|
/* 总数量 */
|
|
312
|
-
|
|
282
|
+
const TotalMemo = useMemo(() => {
|
|
313
283
|
if (typeCom === 'simple' || notLayout('sizes')) {
|
|
314
284
|
return null;
|
|
315
285
|
}
|
|
316
286
|
// 共{total}条
|
|
317
|
-
|
|
287
|
+
const totalFormat = formatNumber(total);
|
|
318
288
|
return jsx("div", Object.assign({
|
|
319
289
|
className: "total-num pagination-space"
|
|
320
290
|
}, {
|
|
@@ -326,7 +296,7 @@ var Pagination = function Pagination(props) {
|
|
|
326
296
|
}));
|
|
327
297
|
}, [total, language, locale, typeCom]);
|
|
328
298
|
/* 每页行数 */
|
|
329
|
-
|
|
299
|
+
const PageLineMemo = useMemo(() => {
|
|
330
300
|
if (notLayout('pageRow')) {
|
|
331
301
|
return null;
|
|
332
302
|
}
|
|
@@ -346,7 +316,7 @@ var Pagination = function Pagination(props) {
|
|
|
346
316
|
}));
|
|
347
317
|
}, [rowsPerPageCom, currentRowsPerPageCom, getPopupContainer, language, locale, typeCom]);
|
|
348
318
|
/** 分页上一页 */
|
|
349
|
-
|
|
319
|
+
const jumpPrevIcon = () => {
|
|
350
320
|
return jsxs("div", Object.assign({
|
|
351
321
|
className: "jump-prev-icon"
|
|
352
322
|
}, {
|
|
@@ -356,7 +326,7 @@ var Pagination = function Pagination(props) {
|
|
|
356
326
|
}));
|
|
357
327
|
};
|
|
358
328
|
/** 分页下一页 */
|
|
359
|
-
|
|
329
|
+
const jumpNextIcon = () => {
|
|
360
330
|
return jsxs("div", Object.assign({
|
|
361
331
|
className: "jump-next-icon"
|
|
362
332
|
}, {
|
|
@@ -366,7 +336,7 @@ var Pagination = function Pagination(props) {
|
|
|
366
336
|
}));
|
|
367
337
|
};
|
|
368
338
|
/* 页码 */
|
|
369
|
-
|
|
339
|
+
const PaginationMemo = useMemo(() => {
|
|
370
340
|
if (typeCom === 'simple' || pagerType !== 'num' || notLayout('pager')) {
|
|
371
341
|
return null;
|
|
372
342
|
}
|
|
@@ -404,7 +374,7 @@ var Pagination = function Pagination(props) {
|
|
|
404
374
|
}));
|
|
405
375
|
}, [total, pageCom, totalPage, currentRowsPerPageCom, typeCom, props.flippingArrow, pagerType]);
|
|
406
376
|
/** 页码btn */
|
|
407
|
-
|
|
377
|
+
const PaginationBtnMemo = useMemo(() => {
|
|
408
378
|
if (notLayout('pager') || typeCom !== 'simple' && pagerType !== 'btn') {
|
|
409
379
|
return null;
|
|
410
380
|
}
|
|
@@ -435,7 +405,7 @@ var Pagination = function Pagination(props) {
|
|
|
435
405
|
}));
|
|
436
406
|
}, [pageCom, totalPage, pagerType, typeCom, locale]);
|
|
437
407
|
/* 跳转页数 */
|
|
438
|
-
|
|
408
|
+
const SkipPageMemo = useMemo(() => {
|
|
439
409
|
if (notLayout('jumper')) {
|
|
440
410
|
return null;
|
|
441
411
|
}
|
|
@@ -463,8 +433,8 @@ var Pagination = function Pagination(props) {
|
|
|
463
433
|
}));
|
|
464
434
|
}, [skipValue, totalPage, language, locale, typeCom]);
|
|
465
435
|
// 处理class
|
|
466
|
-
|
|
467
|
-
|
|
436
|
+
const handClass = () => {
|
|
437
|
+
let str = "".concat($prefixCls, "-pagination");
|
|
468
438
|
/*if (flippingArrow.indexOf('first') === -1 && flippingArrow.indexOf('prev') === -1)
|
|
469
439
|
str += ' ' + $prefixCls + '-pagination-no-left-arrow';
|
|
470
440
|
if (flippingArrow.indexOf('next') === -1 && flippingArrow.indexOf('last') === -1)
|
package/ParauiProvider/index.js
CHANGED
|
@@ -1,48 +1,46 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_verture/defineProperty-1d116156.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import React__default from 'react';
|
|
4
3
|
import GlobalContext, { changeConfirmLocale } from '@para-ui/core/GlobalContext';
|
|
5
4
|
import { GetLanguage } from '@paraview/lib';
|
|
6
|
-
import { i as i18nIntl } from '../_verture/intl-
|
|
5
|
+
import { i as i18nIntl } from '../_verture/intl-f2f27722.js';
|
|
7
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
|
-
import '../_verture/typeof-adeedc13.js';
|
|
9
7
|
|
|
10
8
|
var css_248z = "@charset \"UTF-8\";\n/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n/* Document\n ========================================================================== */\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\nhtml {\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n/**\n * Remove the margin in all browsers.\n */\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n/**\n * Remove the gray background on active links in IE 10.\n */\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n/**\n * Remove the border on images inside links in IE 10.\n */\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\nbutton,\n[type=button],\n[type=reset],\n[type=submit] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\nbutton::-moz-focus-inner,\n[type=button]::-moz-focus-inner,\n[type=reset]::-moz-focus-inner,\n[type=submit]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\nbutton:-moz-focusring,\n[type=button]:-moz-focusring,\n[type=reset]:-moz-focusring,\n[type=submit]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n[type=checkbox],\n[type=radio] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n[type=number]::-webkit-inner-spin-button,\n[type=number]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n[type=search] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n[type=search]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n/**\n * Add the correct display in IE 10+.\n */\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n[hidden] {\n display: none;\n}\n\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n background-color: rgb(234, 236, 241);\n}\n\n::-webkit-scrollbar-track {\n border-radius: 4px;\n}\n\n::-webkit-scrollbar-thumb {\n background: rgb(161, 168, 179);\n border-radius: 4px;\n}\n\n::-webkit-scrollbar-corner {\n background: rgb(234, 236, 241);\n}\n\n::-webkit-scrollbar-thumb:hover {\n background: rgb(212, 218, 227);\n}\n\n::-webkit-scrollbar-thumb:active {\n background: rgb(212, 218, 227);\n}\n\n::-webkit-scrollbar-thumb:window-inactive {\n background-color: rgb(161, 168, 179);\n}\n\n.paraui-v4-scrollbar-small *::-webkit-scrollbar, .paraui-v4-scrollbar-small::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n.paraui-v4-scrollbar-small *::-webkit-scrollbar-track, .paraui-v4-scrollbar-small::-webkit-scrollbar-track {\n border-radius: 2px;\n}\n.paraui-v4-scrollbar-small *::-webkit-scrollbar-thumb, .paraui-v4-scrollbar-small::-webkit-scrollbar-thumb {\n border-radius: 2px;\n}\n\n.paraui-v4-scrollbar-small-deep::-webkit-scrollbar, .paraui-v4-scrollbar-small-deep *::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n background-color: rgb(92, 101, 115);\n}\n.paraui-v4-scrollbar-small-deep::-webkit-scrollbar-track, .paraui-v4-scrollbar-small-deep *::-webkit-scrollbar-track {\n border-radius: 2px;\n}\n.paraui-v4-scrollbar-small-deep::-webkit-scrollbar-thumb, .paraui-v4-scrollbar-small-deep *::-webkit-scrollbar-thumb {\n border-radius: 2px;\n background: rgb(212, 218, 227);\n}\n.paraui-v4-scrollbar-small-deep::-webkit-scrollbar-corner, .paraui-v4-scrollbar-small-deep *::-webkit-scrollbar-corner {\n background: rgb(92, 101, 115);\n}\n.paraui-v4-scrollbar-small-deep::-webkit-scrollbar-thumb:hover, .paraui-v4-scrollbar-small-deep *::-webkit-scrollbar-thumb:hover {\n background: rgb(161, 168, 179);\n}\n.paraui-v4-scrollbar-small-deep::-webkit-scrollbar-thumb:active, .paraui-v4-scrollbar-small-deep *::-webkit-scrollbar-thumb:active {\n background: rgb(161, 168, 179);\n}\n.paraui-v4-scrollbar-small-deep::-webkit-scrollbar-thumb:window-inactive, .paraui-v4-scrollbar-small-deep *::-webkit-scrollbar-thumb:window-inactive {\n background-color: rgb(212, 218, 227);\n}\n\n.paraui-v4-scrollbar-medium *::-webkit-scrollbar, .paraui-v4-scrollbar-medium::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n}\n.paraui-v4-scrollbar-medium *::-webkit-scrollbar-track, .paraui-v4-scrollbar-medium::-webkit-scrollbar-track {\n border-radius: 2px;\n}\n.paraui-v4-scrollbar-medium *::-webkit-scrollbar-thumb, .paraui-v4-scrollbar-medium::-webkit-scrollbar-thumb {\n border-radius: 2px;\n}\n\n.paraui-v4-scrollbar-medium-deep *::-webkit-scrollbar, .paraui-v4-scrollbar-medium-deep::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n background-color: rgb(92, 101, 115);\n}\n.paraui-v4-scrollbar-medium-deep *::-webkit-scrollbar-track, .paraui-v4-scrollbar-medium-deep::-webkit-scrollbar-track {\n border-radius: 2px;\n}\n.paraui-v4-scrollbar-medium-deep *::-webkit-scrollbar-thumb, .paraui-v4-scrollbar-medium-deep::-webkit-scrollbar-thumb {\n border-radius: 2px;\n background: rgb(212, 218, 227);\n}\n.paraui-v4-scrollbar-medium-deep *::-webkit-scrollbar-corner, .paraui-v4-scrollbar-medium-deep::-webkit-scrollbar-corner {\n background: rgb(92, 101, 115);\n}\n.paraui-v4-scrollbar-medium-deep *::-webkit-scrollbar-thumb:hover, .paraui-v4-scrollbar-medium-deep::-webkit-scrollbar-thumb:hover {\n background: rgb(161, 168, 179);\n}\n.paraui-v4-scrollbar-medium-deep *::-webkit-scrollbar-thumb:active, .paraui-v4-scrollbar-medium-deep::-webkit-scrollbar-thumb:active {\n background: rgb(161, 168, 179);\n}\n.paraui-v4-scrollbar-medium-deep *::-webkit-scrollbar-thumb:window-inactive, .paraui-v4-scrollbar-medium-deep::-webkit-scrollbar-thumb:window-inactive {\n background-color: rgb(212, 218, 227);\n}\n\n.paraui-v4-scrollbar-large *::-webkit-scrollbar, .paraui-v4-scrollbar-large::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n.paraui-v4-scrollbar-large *::-webkit-scrollbar-track, .paraui-v4-scrollbar-large::-webkit-scrollbar-track {\n border-radius: 4px;\n}\n.paraui-v4-scrollbar-large *::-webkit-scrollbar-thumb, .paraui-v4-scrollbar-large::-webkit-scrollbar-thumb {\n border-radius: 4px;\n}\n\n.paraui-v4-scrollbar-large-deep *::-webkit-scrollbar, .paraui-v4-scrollbar-large-deep::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n background-color: rgb(92, 101, 115);\n}\n.paraui-v4-scrollbar-large-deep *::-webkit-scrollbar-track, .paraui-v4-scrollbar-large-deep::-webkit-scrollbar-track {\n border-radius: 4px;\n}\n.paraui-v4-scrollbar-large-deep *::-webkit-scrollbar-thumb, .paraui-v4-scrollbar-large-deep::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: rgb(212, 218, 227);\n}\n.paraui-v4-scrollbar-large-deep *::-webkit-scrollbar-corner, .paraui-v4-scrollbar-large-deep::-webkit-scrollbar-corner {\n background: rgb(92, 101, 115);\n}\n.paraui-v4-scrollbar-large-deep *::-webkit-scrollbar-thumb:hover, .paraui-v4-scrollbar-large-deep::-webkit-scrollbar-thumb:hover {\n background: rgb(161, 168, 179);\n}\n.paraui-v4-scrollbar-large-deep *::-webkit-scrollbar-thumb:active, .paraui-v4-scrollbar-large-deep::-webkit-scrollbar-thumb:active {\n background: rgb(161, 168, 179);\n}\n.paraui-v4-scrollbar-large-deep *::-webkit-scrollbar-thumb:window-inactive, .paraui-v4-scrollbar-large-deep::-webkit-scrollbar-thumb:window-inactive {\n background-color: rgb(212, 218, 227);\n}\n\n.paraui-v4-form .paraui-v4-helper-text {\n min-height: 20px;\n}\n\n* {\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 margin: 0;\n padding: 0;\n box-sizing: border-box;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\nhtml, body {\n width: 100%;\n height: 100%;\n overflow: hidden;\n}\n\nol, ul {\n list-style: none;\n}\n\na,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\ninput,\nselect,\nbutton,\ntextarea {\n outline: none;\n}\n\nsvg {\n overflow: hidden;\n}";
|
|
11
9
|
styleInject(css_248z);
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
const ParauiProvider = props => {
|
|
14
12
|
/**
|
|
15
13
|
* 国际化
|
|
16
14
|
* @param defI18nData 默认组件语言
|
|
17
15
|
* @param comName 组件名称
|
|
18
16
|
* @param id 键值
|
|
19
17
|
* */
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return i18nIntl({
|
|
27
|
-
ops: ops,
|
|
28
|
-
i18nData: i18nData,
|
|
29
|
-
lang: lang,
|
|
30
|
-
params: params,
|
|
31
|
-
defI18nData: defI18nData
|
|
32
|
-
});
|
|
18
|
+
const intlFormat = (comName, defI18nData) => (ops, params) => {
|
|
19
|
+
const lang = props.language || GetLanguage();
|
|
20
|
+
const locale = props.locale || {};
|
|
21
|
+
let i18nData = locale[lang] || {};
|
|
22
|
+
i18nData = {
|
|
23
|
+
[lang]: i18nData[comName] || {}
|
|
33
24
|
};
|
|
25
|
+
return i18nIntl({
|
|
26
|
+
ops,
|
|
27
|
+
i18nData,
|
|
28
|
+
lang,
|
|
29
|
+
params,
|
|
30
|
+
defI18nData
|
|
31
|
+
});
|
|
34
32
|
};
|
|
35
|
-
React__default.useEffect(
|
|
33
|
+
React__default.useEffect(() => {
|
|
36
34
|
// Confirm 国际化
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
const lang = props.language || GetLanguage();
|
|
36
|
+
const locale = props.locale || {};
|
|
37
|
+
const i18nData = locale[lang] || {};
|
|
40
38
|
changeConfirmLocale === null || changeConfirmLocale === void 0 ? void 0 : changeConfirmLocale(i18nData);
|
|
41
39
|
}, [props.language, props.locale]);
|
|
42
40
|
return jsx(GlobalContext.Provider, Object.assign({
|
|
43
41
|
value: Object.assign(Object.assign({}, props), {
|
|
44
42
|
language: props.language || GetLanguage(),
|
|
45
|
-
intlFormat
|
|
43
|
+
intlFormat
|
|
46
44
|
})
|
|
47
45
|
}, {
|
|
48
46
|
children: props.children
|