@para-ui/core 3.0.27 → 3.0.28

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.
@@ -40,18 +40,18 @@ import '../_verture/useGlobalProps-af9a2af6.js';
40
40
  import '../OperateBtn/index.js';
41
41
  import '@para-ui/icons/More';
42
42
  import '../Pagination/index.js';
43
- import 'rc-pagination';
44
- import '@para-ui/icons/DoubleLeft';
45
- import '@para-ui/icons/DoubleRight';
46
- import '@para-ui/icons/Left';
47
- import '@para-ui/icons/Right';
48
- import '../Select/index.js';
49
- import '@para-ui/icons/Check';
50
- import '../Loading/index.js';
51
- import '@para-ui/icons/LoadingF';
52
43
  import '../TextField/index.js';
53
44
  import '@para-ui/icons/PreviewClose';
54
45
  import '@para-ui/icons/PreviewOpen';
46
+ import '../Loading/index.js';
47
+ import '@para-ui/icons/LoadingF';
48
+ import '../Select/index.js';
49
+ import '@para-ui/icons/Check';
50
+ import '@para-ui/icons/DoubleLeft';
51
+ import '@para-ui/icons/Left';
52
+ import 'rc-pagination';
53
+ import '@para-ui/icons/Right';
54
+ import '@para-ui/icons/DoubleRight';
55
55
  import 'rc-tree';
56
56
  import '@para-ui/icons/Document';
57
57
  import 'react-dom';
package/Form/index.js CHANGED
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { DeepClone } from '@paraview/lib';
5
5
  import React__default from 'react';
6
- import { F as FormItem, v as validate } from '../_verture/index-c40bd040.js';
6
+ import { F as FormItem, v as validate } from '../_verture/index-48875ffd.js';
7
7
  import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
8
8
  import '../TextField/index.js';
9
9
  import '../_verture/typeof-498dd2b1.js';
@@ -63,11 +63,11 @@ import '@para-ui/icons/Panel';
63
63
  import '../OperateBtn/index.js';
64
64
  import '@para-ui/icons/More';
65
65
  import '../Pagination/index.js';
66
- import 'rc-pagination';
67
66
  import '@para-ui/icons/DoubleLeft';
68
- import '@para-ui/icons/DoubleRight';
69
67
  import '@para-ui/icons/Left';
68
+ import 'rc-pagination';
70
69
  import '@para-ui/icons/Right';
70
+ import '@para-ui/icons/DoubleRight';
71
71
  import '../_verture/index-31ce5a11.js';
72
72
  import 'rc-tree';
73
73
  import '@para-ui/icons/Document';
package/FormItem/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { F as default } from '../_verture/index-c40bd040.js';
3
+ export { F as default } from '../_verture/index-48875ffd.js';
4
4
  import 'clsx';
5
5
  import '../Label/index.js';
6
6
  import '../_verture/constant-bf34e6fa.js';
@@ -63,11 +63,11 @@ import '@para-ui/icons/Panel';
63
63
  import '../OperateBtn/index.js';
64
64
  import '@para-ui/icons/More';
65
65
  import '../Pagination/index.js';
66
- import 'rc-pagination';
67
66
  import '@para-ui/icons/DoubleLeft';
68
- import '@para-ui/icons/DoubleRight';
69
67
  import '@para-ui/icons/Left';
68
+ import 'rc-pagination';
70
69
  import '@para-ui/icons/Right';
70
+ import '@para-ui/icons/DoubleRight';
71
71
  import '../_verture/index-31ce5a11.js';
72
72
  import 'rc-tree';
73
73
  import '@para-ui/icons/Document';
@@ -1,18 +1,29 @@
1
1
  /**
2
2
  * @author linhd
3
- * @date 2021/10/26 13:57
4
- * @description 分页
3
+ * @date 2022/12/13 2:19 PM
4
+ * @description 分页组件
5
5
  */
6
- import React, { FunctionComponent } from 'react';
6
+ import React, { FunctionComponent } from "react";
7
7
  import './index.scss';
8
+ /**
9
+ * sizes: 总数
10
+ * currentPage:当前第...页
11
+ * pageRow:每页行数
12
+ * pager: 切换页数
13
+ * jumper: 跳转到
14
+ * */
15
+ export declare type PaginationLayout = 'sizes' | 'currentPage' | 'pageRow' | 'pager' | 'jumper';
16
+ export declare type PaginationFlippingArrow = 'first' | 'prev' | 'next' | 'last';
8
17
  export interface PaginationProps {
9
18
  /** class名称 */
10
19
  className?: string;
11
20
  /** style */
12
21
  style?: React.CSSProperties;
13
22
  /** 模式 */
14
- type?: 'simple' | 'complex';
15
- /** 自适应模式 只有type=complex生效 */
23
+ type?: 'simple' | 'complex' | PaginationLayout[];
24
+ /** 方向键layout,默认全有 */
25
+ flippingArrow?: PaginationFlippingArrow[];
26
+ /** 自适应模式 只有type=complex生效,默认true */
16
27
  autoType?: boolean;
17
28
  /** 总数 */
18
29
  total?: number;
@@ -1,47 +1,50 @@
1
1
  import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
2
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import React__default, { useState, useRef, useEffect, useMemo } from 'react';
4
- import PaginationCom from 'rc-pagination';
4
+ import GlobalContext from '@para-ui/core/GlobalContext';
5
+ import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
6
+ import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-bf34e6fa.js';
7
+ import { TextField } from '../TextField/index.js';
8
+ import { u as useFormatMessage } from '../_verture/useFormatMessage-f4452258.js';
9
+ import Select from '../Select/index.js';
5
10
  import DoubleLeft from '@para-ui/icons/DoubleLeft';
6
- import DoubleRight from '@para-ui/icons/DoubleRight';
7
11
  import NavigateBefore from '@para-ui/icons/Left';
12
+ import PaginationCom from 'rc-pagination';
8
13
  import Right from '@para-ui/icons/Right';
9
- import Select from '../Select/index.js';
10
- import { TextField } from '../TextField/index.js';
11
- import { u as useFormatMessage } from '../_verture/useFormatMessage-f4452258.js';
12
- import GlobalContext from '@para-ui/core/GlobalContext';
13
- import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-bf34e6fa.js';
14
- import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
15
- import '../_verture/defineProperty-0590dc61.js';
16
- import '../_verture/toConsumableArray-f8047a75.js';
14
+ import DoubleRight from '@para-ui/icons/DoubleRight';
17
15
  import '../_verture/typeof-498dd2b1.js';
18
- import '../Empty/index.js';
19
- import 'clsx';
20
- import '../_verture/useGlobalProps-af9a2af6.js';
16
+ import '../_verture/tslib.es6-55ed4bd2.js';
21
17
  import '../Label/index.js';
22
18
  import '../Help/index.js';
23
- import '../_verture/tslib.es6-55ed4bd2.js';
24
19
  import '../Tooltip/index.js';
25
20
  import 'rc-tooltip';
26
21
  import 'rc-tooltip/lib/placements';
22
+ import 'clsx';
27
23
  import '@para-ui/icons/Help';
24
+ import '@paraview/lib';
25
+ import '@para-ui/icons/PreviewClose';
26
+ import '@para-ui/icons/PreviewOpen';
27
+ import '@para-ui/icons/CloseCircle';
28
+ import '../AutoTips/index.js';
29
+ import '../Loading/index.js';
30
+ import '@para-ui/icons/LoadingF';
31
+ import '../HelperText/index.js';
32
+ import '../_verture/useGlobalProps-af9a2af6.js';
28
33
  import '../_verture/index-bbed73a3.js';
29
34
  import 'rc-dropdown';
30
35
  import '../_verture/usePopupContainer-b8ab7cab.js';
31
36
  import 'dayjs';
32
- import '@paraview/lib';
37
+ import '../_verture/defineProperty-0590dc61.js';
38
+ import '../_verture/toConsumableArray-f8047a75.js';
39
+ import '../Empty/index.js';
33
40
  import '@para-ui/icons/Close';
34
- import '@para-ui/icons/CloseCircle';
35
41
  import '@para-ui/icons/Down';
36
42
  import '@para-ui/icons/Check';
37
43
  import '@para-ui/icons/Search';
38
- import '../AutoTips/index.js';
39
- import '../Loading/index.js';
40
- import '@para-ui/icons/LoadingF';
41
44
  import '../Popover/index.js';
42
- import '../HelperText/index.js';
43
- import '@para-ui/icons/PreviewClose';
44
- import '@para-ui/icons/PreviewOpen';
45
+
46
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/10/26 13:57\n* @description 分页样式\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-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: rgba(46, 55, 67, 0.7);\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n opacity: 1;\n}\n.paraui-v3-pagination.paraui-v3-pagination-over {\n overflow: hidden;\n height: 32px;\n opacity: 0;\n transition: all 0.3s;\n}\n.paraui-v3-pagination.paraui-v3-pagination-no-left-arrow > .pagination-content {\n padding-left: 0;\n}\n.paraui-v3-pagination.paraui-v3-pagination-no-right-arrow > .pagination-content {\n padding-right: 0;\n}\n.paraui-v3-pagination > .pagination-space {\n margin-right: 24px;\n}\n.paraui-v3-pagination > .pagination-space:last-child {\n margin-right: 0;\n}\n.paraui-v3-pagination > .current-page > .current-page-num {\n color: rgb(46, 55, 67);\n margin-right: 4px;\n margin-left: 4px;\n}\n.paraui-v3-pagination > .current-page > .current-page-sign {\n margin-right: 3px;\n}\n.paraui-v3-pagination > .page-line-memo > span {\n display: inline-block;\n margin-right: 8px;\n vertical-align: middle;\n}\n.paraui-v3-pagination > .page-line-memo .page-line-select {\n min-width: 80px;\n width: inherit;\n vertical-align: middle;\n}\n.paraui-v3-pagination > .pagination-content {\n border: 1px solid rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n height: 32px;\n line-height: 30px;\n padding: 0 12px;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-pagination > .pagination-content > .left-page, .paraui-v3-pagination > .pagination-content > .right-page {\n display: inline-block;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div, .paraui-v3-pagination > .pagination-content > .right-page > div {\n display: inline-block;\n line-height: 0;\n vertical-align: top;\n cursor: pointer;\n width: 20px;\n height: 20px;\n border-radius: 2px;\n margin-right: 8px;\n position: relative;\n top: 5px;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn {\n cursor: not-allowed;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn > svg, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn:hover, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn:hover {\n background-color: white;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn:hover > svg, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:last-child, .paraui-v3-pagination > .pagination-content > .right-page > div:last-child {\n margin-right: 0;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:hover, .paraui-v3-pagination > .pagination-content > .right-page > div:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:hover > svg, .paraui-v3-pagination > .pagination-content > .right-page > div:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div > svg, .paraui-v3-pagination > .pagination-content > .right-page > div > svg {\n font-size: 16px;\n position: relative;\n top: 2px;\n left: 2px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-pagination > .pagination-content > .left-page {\n margin-right: 8px;\n}\n.paraui-v3-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-v3-pagination > .pagination-content > .component-pagination > li {\n min-width: 20px;\n height: 20px;\n line-height: 20px;\n display: inline-block;\n text-align: center;\n cursor: pointer;\n border-radius: 2px;\n padding: 0 5px;\n margin: 0 3px;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li:first-child, .paraui-v3-pagination > .pagination-content > .component-pagination > li:last-child, .paraui-v3-pagination > .pagination-content > .component-pagination > li.component-pagination-next {\n display: none;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li:hover {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li.component-pagination-item-active {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .right-page {\n margin-left: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo {\n display: flex;\n align-items: center;\n}\n.paraui-v3-pagination > .skip-page-memo > span {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field {\n width: 58px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .right-icon {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 8px;\n padding-right: 4px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding: 0 8px;\n}";
47
+ styleInject(css_248z);
45
48
 
46
49
  var en = {
47
50
  total: 'Total {total}',
@@ -64,9 +67,6 @@ var localeJson = {
64
67
  en: en
65
68
  };
66
69
 
67
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/10/26 13:57\n* @description 分页样式\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-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: rgba(46, 55, 67, 0.7);\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n opacity: 1;\n}\n.paraui-v3-pagination.paraui-v3-pagination-over {\n overflow: hidden;\n height: 32px;\n opacity: 0;\n transition: all 0.3s;\n}\n.paraui-v3-pagination > .total-num {\n margin-right: 24px;\n}\n.paraui-v3-pagination > .current-page {\n margin-right: 24px;\n}\n.paraui-v3-pagination > .current-page > .current-page-num {\n color: rgb(46, 55, 67);\n margin-right: 4px;\n margin-left: 4px;\n}\n.paraui-v3-pagination > .current-page > .current-page-sign {\n margin-right: 3px;\n}\n.paraui-v3-pagination > .page-line-memo {\n margin-right: 24px;\n}\n.paraui-v3-pagination > .page-line-memo > span {\n display: inline-block;\n margin-right: 8px;\n vertical-align: middle;\n}\n.paraui-v3-pagination > .page-line-memo .page-line-select {\n min-width: 80px;\n width: inherit;\n vertical-align: middle;\n}\n.paraui-v3-pagination > .pagination-content {\n border: 1px solid rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n height: 32px;\n line-height: 30px;\n padding: 0 12px;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-pagination > .pagination-content > .left-page, .paraui-v3-pagination > .pagination-content > .right-page {\n display: inline-block;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div, .paraui-v3-pagination > .pagination-content > .right-page > div {\n display: inline-block;\n line-height: 0;\n vertical-align: top;\n cursor: pointer;\n width: 20px;\n height: 20px;\n border-radius: 2px;\n margin-right: 8px;\n position: relative;\n top: 5px;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn {\n cursor: not-allowed;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn > svg, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn:hover, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn:hover {\n background-color: white;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div.disabled-btn:hover > svg, .paraui-v3-pagination > .pagination-content > .right-page > div.disabled-btn:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:last-child, .paraui-v3-pagination > .pagination-content > .right-page > div:last-child {\n margin-right: 0;\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:hover, .paraui-v3-pagination > .pagination-content > .right-page > div:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div:hover > svg, .paraui-v3-pagination > .pagination-content > .right-page > div:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .left-page > div > svg, .paraui-v3-pagination > .pagination-content > .right-page > div > svg {\n font-size: 16px;\n position: relative;\n top: 2px;\n left: 2px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-pagination > .pagination-content > .left-page {\n margin-right: 8px;\n}\n.paraui-v3-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-v3-pagination > .pagination-content > .component-pagination > li {\n min-width: 20px;\n height: 20px;\n line-height: 20px;\n display: inline-block;\n text-align: center;\n cursor: pointer;\n border-radius: 2px;\n padding: 0 5px;\n margin: 0 3px;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li:first-child, .paraui-v3-pagination > .pagination-content > .component-pagination > li:last-child, .paraui-v3-pagination > .pagination-content > .component-pagination > li.component-pagination-next {\n display: none;\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li:hover {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .component-pagination > li.component-pagination-item-active {\n background-color: rgba(171, 176, 185, 0.12);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-pagination > .pagination-content > .right-page {\n margin-left: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo {\n margin-left: 24px;\n display: flex;\n align-items: center;\n}\n.paraui-v3-pagination > .skip-page-memo > span {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field {\n width: 58px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .right-icon {\n margin-right: 8px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 8px;\n padding-right: 4px;\n}\n.paraui-v3-pagination > .skip-page-memo > .skip-page-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding: 0 8px;\n}";
68
- styleInject(css_248z);
69
-
70
70
  var Pagination = function Pagination(props) {
71
71
  var className = props.className,
72
72
  style = props.style,
@@ -78,6 +78,8 @@ var Pagination = function Pagination(props) {
78
78
  total = _props$total === void 0 ? 0 : _props$total,
79
79
  _props$rowsPerPage = props.rowsPerPage,
80
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,
81
83
  _props$currentRowsPer = props.currentRowsPerPage,
82
84
  currentRowsPerPage = _props$currentRowsPer === void 0 ? 10 : _props$currentRowsPer,
83
85
  _props$page = props.page,
@@ -91,76 +93,67 @@ var Pagination = function Pagination(props) {
91
93
  language = _React$useContext.language,
92
94
  locale = _React$useContext.locale;
93
95
 
96
+ var intl = useFormatMessage('Pagination', localeJson);
97
+
94
98
  var _useState = useState(currentRowsPerPage),
95
99
  _useState2 = _slicedToArray(_useState, 2),
96
100
  currentRowsPerPageCom = _useState2[0],
97
101
  setCurrentRowsPerPageCom = _useState2[1]; // 当前选中每页行数
98
102
 
99
103
 
100
- var _useState3 = useState(page),
104
+ var _useState3 = useState([]),
101
105
  _useState4 = _slicedToArray(_useState3, 2),
102
- pageCom = _useState4[0],
103
- setPageCom = _useState4[1]; // 当前页数
106
+ rowsPerPageCom = _useState4[0],
107
+ setRowsPerPageCom = _useState4[1]; // 每页显示的行数
104
108
 
105
109
 
106
- var _useState5 = useState(),
110
+ var _useState5 = useState(page),
107
111
  _useState6 = _slicedToArray(_useState5, 2),
108
- totalPage = _useState6[0],
109
- setTotalPage = _useState6[1]; // 总页数
112
+ pageCom = _useState6[0],
113
+ setPageCom = _useState6[1]; // 当前页数
110
114
 
111
115
 
112
116
  var _useState7 = useState(),
113
117
  _useState8 = _slicedToArray(_useState7, 2),
114
- skipValue = _useState8[0],
115
- setSkipValue = _useState8[1];
118
+ totalPage = _useState8[0],
119
+ setTotalPage = _useState8[1]; // 总页数
116
120
 
117
- var _useState9 = useState([]),
121
+
122
+ var _useState9 = useState(),
118
123
  _useState10 = _slicedToArray(_useState9, 2),
119
- rowsPerPageCom = _useState10[0],
120
- setRowsPerPageCom = _useState10[1];
124
+ skipValue = _useState10[0],
125
+ setSkipValue = _useState10[1]; // 跳转页数
126
+
121
127
 
122
128
  var _useState11 = useState(),
123
129
  _useState12 = _slicedToArray(_useState11, 2),
124
130
  typeCom = _useState12[0],
125
- setTypeCom = _useState12[1];
126
-
127
- var refDom = useRef();
131
+ setTypeCom = _useState12[1]; // 组件类型
128
132
 
129
- var _useState13 = useState({}),
130
- _useState14 = _slicedToArray(_useState13, 1),
131
- constData = _useState14[0];
132
133
 
133
- constData.type = type;
134
- constData.autoType = autoType;
135
- var intl = useFormatMessage('Pagination', localeJson);
134
+ var refDom = useRef();
135
+ var constData = useRef({});
136
+ constData.current.type = type;
137
+ constData.current.autoType = autoType;
136
138
  useEffect(function () {
137
139
  return function () {
138
140
  window.removeEventListener("resize", changeSize);
139
- clearTimeout(constData.timer);
140
- clearTimeout(constData.timerClass);
141
- clearTimeout(constData.changePagination);
141
+ clearTimeout(constData.current.timer);
142
+ clearTimeout(constData.current.timerClass);
143
+ clearTimeout(constData.current.changePagination);
142
144
  };
143
145
  }, []);
144
146
  useEffect(function () {
145
- if (currentRowsPerPage !== currentRowsPerPageCom) setCurrentRowsPerPageCom(currentRowsPerPage);
146
- }, [currentRowsPerPage]);
147
- useEffect(function () {
148
- if (page !== pageCom) {
149
- setPageCom(page);
150
- }
151
- }, [page]);
147
+ setTypeCom(type);
148
+ }, [type]);
152
149
  useEffect(function () {
153
- var num = Number(totalPage);
150
+ setPageCom(page);
151
+ }, [page]); // 当前选中每页行数
154
152
 
155
- if (pageCom > num && num !== pageCom) {
156
- setPageCom(num);
157
- }
158
- }, [pageCom, totalPage]);
159
153
  useEffect(function () {
160
- var num = Math.ceil(total / currentRowsPerPageCom); // props.page 防止外部传入自定义页面,设置无效(表格分页)
154
+ setCurrentRowsPerPageCom(currentRowsPerPage);
155
+ }, [currentRowsPerPage]); // 下拉页数列表
161
156
 
162
- setTotalPage(num || props.page || 1);
163
- }, [currentRowsPerPageCom, total]);
164
157
  useEffect(function () {
165
158
  var arr = [];
166
159
 
@@ -176,8 +169,17 @@ var Pagination = function Pagination(props) {
176
169
  setRowsPerPageCom(arr);
177
170
  }, [props.rowsPerPage]);
178
171
  useEffect(function () {
179
- setTypeCom(type);
180
- }, [type]);
172
+ var num = Number(totalPage);
173
+
174
+ if (pageCom > num && num !== pageCom) {
175
+ setPageCom(num);
176
+ }
177
+ }, [pageCom, totalPage]);
178
+ useEffect(function () {
179
+ var num = Math.ceil(total / currentRowsPerPageCom); // props.page 防止外部传入自定义页面,设置无效(表格分页)
180
+
181
+ setTotalPage(num || props.page || 1);
182
+ }, [currentRowsPerPageCom, total]);
181
183
  useEffect(function () {
182
184
  if (type === 'complex' && autoType) {
183
185
  changeSize(); // 复杂模式,且开启自适应模式
@@ -189,7 +191,7 @@ var Pagination = function Pagination(props) {
189
191
  }
190
192
  }, [type, autoType]);
191
193
  useEffect(function () {
192
- if (constData.type === 'complex' && constData.autoType) {
194
+ if (constData.current.type === 'complex' && constData.current.autoType) {
193
195
  changePagination();
194
196
  }
195
197
  }, [total, currentRowsPerPageCom, pageCom, language]);
@@ -198,8 +200,8 @@ var Pagination = function Pagination(props) {
198
200
  * */
199
201
 
200
202
  var changePagination = function changePagination() {
201
- clearTimeout(constData.changePagination);
202
- constData.changePagination = setTimeout(function () {
203
+ clearTimeout(constData.current.changePagination);
204
+ constData.current.changePagination = setTimeout(function () {
203
205
  var current = refDom.current;
204
206
  var skipDom = current && current.querySelector('.skip-page-memo'); // 简单模式,不存在跳转
205
207
 
@@ -215,16 +217,16 @@ var Pagination = function Pagination(props) {
215
217
  }
216
218
  });
217
219
  };
218
- /** 屏幕宽度发生变化 */
220
+ /** 改变屏幕大小 */
219
221
 
220
222
 
221
223
  var changeSize = function changeSize() {
222
- clearTimeout(constData.timer);
223
- clearTimeout(constData.timerClass);
224
+ clearTimeout(constData.current.timer);
225
+ clearTimeout(constData.current.timerClass);
224
226
  var current = refDom.current;
225
227
  if (!current) return;
226
228
  current.classList.add($prefixCls + '-pagination-over');
227
- constData.timer = setTimeout(function () {
229
+ constData.current.timer = setTimeout(function () {
228
230
  if (!current) return;
229
231
  var skipDom = current.querySelector('.skip-page-memo'); // 简单模式,不存在跳转
230
232
 
@@ -239,17 +241,18 @@ var Pagination = function Pagination(props) {
239
241
  changeSize();
240
242
  }
241
243
 
242
- constData.timerClass = setTimeout(function () {
244
+ constData.current.timerClass = setTimeout(function () {
243
245
  current.classList.remove($prefixCls + '-pagination-over');
244
246
  }, 200);
245
247
  }, 200);
246
- }; // 点击每页行数下拉
248
+ };
249
+ /**
250
+ * 是否存在当前类型
251
+ * */
247
252
 
248
253
 
249
- var clickRowsPerPage = function clickRowsPerPage(num) {
250
- if (num === currentRowsPerPageCom) return;
251
- setCurrentRowsPerPageCom(num);
252
- if (changeRowsPerPage) changeRowsPerPage(num);
254
+ var notLayout = function notLayout(layout) {
255
+ return constData.current.type instanceof Array && constData.current.type.indexOf(layout) === -1;
253
256
  }; // 点击分页
254
257
 
255
258
 
@@ -286,6 +289,13 @@ var Pagination = function Pagination(props) {
286
289
  if (num !== undefined) setPageCom(num);
287
290
  changePage && changePage(num);
288
291
  };
292
+ }; // 点击每页行数下拉
293
+
294
+
295
+ var clickRowsPerPage = function clickRowsPerPage(num) {
296
+ if (num === currentRowsPerPageCom) return;
297
+ setCurrentRowsPerPageCom(num);
298
+ if (changeRowsPerPage) changeRowsPerPage(num);
289
299
  }; // 鼠标按下
290
300
 
291
301
 
@@ -327,9 +337,13 @@ var Pagination = function Pagination(props) {
327
337
 
328
338
 
329
339
  var TotalMemo = useMemo(function () {
330
- // {total}条
340
+ if (typeCom === 'simple' || notLayout('sizes')) {
341
+ return null;
342
+ } // 共{total}条
343
+
344
+
331
345
  return jsx("div", Object.assign({
332
- className: "total-num"
346
+ className: "total-num pagination-space"
333
347
  }, {
334
348
  children: intl({
335
349
  id: 'total'
@@ -337,12 +351,16 @@ var Pagination = function Pagination(props) {
337
351
  total: total
338
352
  })
339
353
  }));
340
- }, [total, language, locale]);
354
+ }, [total, language, locale, typeCom]);
341
355
  /* 每页行数 */
342
356
 
343
357
  var PageLineMemo = useMemo(function () {
358
+ if (notLayout('pageRow')) {
359
+ return null;
360
+ }
361
+
344
362
  return jsxs("div", Object.assign({
345
- className: "page-line-memo"
363
+ className: "page-line-memo pagination-space"
346
364
  }, {
347
365
  children: [jsx("span", {
348
366
  children: intl({
@@ -359,10 +377,14 @@ var Pagination = function Pagination(props) {
359
377
  getPopupContainer: getPopupContainer
360
378
  })]
361
379
  }));
362
- }, [rowsPerPageCom, currentRowsPerPageCom, getPopupContainer, language, locale]);
380
+ }, [rowsPerPageCom, currentRowsPerPageCom, getPopupContainer, language, locale, typeCom]);
363
381
  /* 当前页面 */
364
382
 
365
383
  var CurrentPageMemo = useMemo(function () {
384
+ if (notLayout('currentPage')) {
385
+ return null;
386
+ }
387
+
366
388
  var html = jsxs(Fragment, {
367
389
  children: [jsx("span", Object.assign({
368
390
  className: "current-page-num"
@@ -380,7 +402,7 @@ var Pagination = function Pagination(props) {
380
402
  });
381
403
 
382
404
  return jsx("div", Object.assign({
383
- className: "current-page"
405
+ className: "current-page pagination-space"
384
406
  }, {
385
407
  children: intl({
386
408
  id: 'currentPage'
@@ -388,28 +410,33 @@ var Pagination = function Pagination(props) {
388
410
  currentPage: html
389
411
  })
390
412
  }));
391
- }, [pageCom, totalPage, language, locale]);
413
+ }, [pageCom, totalPage, language, locale, typeCom]);
392
414
  /* 页码 */
393
415
 
394
416
  var PaginationMemo = useMemo(function () {
417
+ if (notLayout('pager')) {
418
+ return null;
419
+ }
420
+
421
+ var bol = constData.current.type instanceof Array && constData.current.type.indexOf('pager') !== -1;
395
422
  return jsxs("div", Object.assign({
396
- className: "pagination-content"
423
+ className: "pagination-content pagination-space"
397
424
  }, {
398
425
  children: [jsxs("div", Object.assign({
399
426
  className: "left-page"
400
427
  }, {
401
- children: [jsx("div", Object.assign({
428
+ children: [flippingArrow.indexOf('first') !== -1 && jsx("div", Object.assign({
402
429
  onClick: clickPage('first'),
403
430
  className: pageCom === 1 ? 'disabled-btn' : ''
404
431
  }, {
405
432
  children: jsx(DoubleLeft, {})
406
- })), jsx("div", Object.assign({
433
+ })), flippingArrow.indexOf('prev') !== -1 && jsx("div", Object.assign({
407
434
  onClick: clickPage('prev'),
408
435
  className: pageCom === 1 ? 'disabled-btn' : ''
409
436
  }, {
410
437
  children: jsx(NavigateBefore, {})
411
438
  }))]
412
- })), typeCom === 'complex' && jsx(PaginationCom, {
439
+ })), (typeCom === 'complex' || bol) && jsx(PaginationCom, {
413
440
  prefixCls: $rcPrefixCls + '-pagination',
414
441
  current: pageCom,
415
442
  pageSize: currentRowsPerPageCom,
@@ -421,12 +448,12 @@ var Pagination = function Pagination(props) {
421
448
  }), jsxs("div", Object.assign({
422
449
  className: "right-page"
423
450
  }, {
424
- children: [jsx("div", Object.assign({
451
+ children: [flippingArrow.indexOf('next') !== -1 && jsx("div", Object.assign({
425
452
  onClick: clickPage('next'),
426
453
  className: pageCom === totalPage ? 'disabled-btn' : ''
427
454
  }, {
428
455
  children: jsx(Right, {})
429
- })), jsx("div", Object.assign({
456
+ })), flippingArrow.indexOf('last') !== -1 && jsx("div", Object.assign({
430
457
  onClick: clickPage('last'),
431
458
  className: pageCom === totalPage ? 'disabled-btn' : ''
432
459
  }, {
@@ -434,12 +461,16 @@ var Pagination = function Pagination(props) {
434
461
  }))]
435
462
  }))]
436
463
  }));
437
- }, [total, pageCom, totalPage, currentRowsPerPageCom, typeCom]);
464
+ }, [total, pageCom, totalPage, currentRowsPerPageCom, typeCom, props.flippingArrow]);
438
465
  /* 跳转页数 */
439
466
 
440
467
  var SkipPageMemo = useMemo(function () {
468
+ if (typeCom === 'simple' || notLayout('jumper')) {
469
+ return null;
470
+ }
471
+
441
472
  return jsxs("div", Object.assign({
442
- className: "skip-page-memo"
473
+ className: "skip-page-memo pagination-space"
443
474
  }, {
444
475
  children: [jsx("span", {
445
476
  children: intl({
@@ -459,10 +490,12 @@ var Pagination = function Pagination(props) {
459
490
  onKeyUp: keyUp
460
491
  })]
461
492
  }));
462
- }, [skipValue, totalPage, language, locale]); // 处理class
493
+ }, [skipValue, totalPage, language, locale, typeCom]); // 处理class
463
494
 
464
495
  var handClass = function handClass() {
465
496
  var str = $prefixCls + '-pagination';
497
+ if (flippingArrow.indexOf('first') === -1 && flippingArrow.indexOf('prev') === -1) str += ' ' + $prefixCls + '-pagination-no-left-arrow';
498
+ if (flippingArrow.indexOf('next') === -1 && flippingArrow.indexOf('last') === -1) str += ' ' + $prefixCls + '-pagination-no-right-arrow';
466
499
  if (className) str += ' ' + className;
467
500
  return str;
468
501
  };
@@ -472,7 +505,7 @@ var Pagination = function Pagination(props) {
472
505
  style: style,
473
506
  ref: refDom
474
507
  }, {
475
- children: [typeCom === 'complex' && TotalMemo, CurrentPageMemo, PageLineMemo, PaginationMemo, typeCom === 'complex' && SkipPageMemo]
508
+ children: [TotalMemo, CurrentPageMemo, PageLineMemo, PaginationMemo, SkipPageMemo]
476
509
  }));
477
510
  };
478
511
 
package/README.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 版本: 3.0.28
2
+
3
+ para-ui/core@3.0.28 发布
4
+ 【分页-Pagination】增加自定义渲染布局
5
+ 【表格-Table】增加 rowClassMapping 用来增加行的class
6
+ 【选择器-Selector】修改主标题,副标题超出...,不显示提示
7
+ 【表格-Table】HeadDataProps增加autoTips参数,来控制是否显示...
8
+ 【穿梭款-Transfer】优化穿梭款初始化排序
9
+ 【下拉选择器-SelectorPicker】默认挂载容器须同时满足overflow属性和出现滚动条,否则挂载到body
10
+
1
11
  ## 版本: 3.0.27
2
12
 
3
13
  para-ui/core@3.0.27 发布
package/Selector/index.js CHANGED
@@ -7,6 +7,7 @@ import { useState, useRef, useEffect, Fragment as Fragment$1 } from 'react';
7
7
  import { Radio } from '../Radio/index.js';
8
8
  import { Checkbox } from '../Checkbox/index.js';
9
9
  import { Popover } from '../Popover/index.js';
10
+ import AutoTips from '../AutoTips/index.js';
10
11
  import { Loading } from '../Loading/index.js';
11
12
  import CloseIcon from '@para-ui/icons/Close';
12
13
  import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
@@ -18,7 +19,6 @@ import Empty from '../Empty/index.js';
18
19
  import SearchIcon from '@para-ui/icons/Search';
19
20
  import Refresh from '@para-ui/icons/Refresh';
20
21
  import { ArrayToObject, Get, Post, Cancel } from '@paraview/lib';
21
- import AutoTips from '../AutoTips/index.js';
22
22
  import { u as useGlobalProps } from '../_verture/useGlobalProps-af9a2af6.js';
23
23
  import '../Label/index.js';
24
24
  import '../Help/index.js';
@@ -264,11 +264,15 @@ var SelectorNode = function SelectorNode(props) {
264
264
  children: [mainTitle && jsx("span", Object.assign({
265
265
  className: "main-title"
266
266
  }, {
267
- children: mainTitle
267
+ children: jsx(AutoTips, {
268
+ children: mainTitle
269
+ })
268
270
  })), subTitle && jsx("span", Object.assign({
269
271
  className: "sub-title"
270
272
  }, {
271
- children: subTitle
273
+ children: jsx(AutoTips, {
274
+ children: subTitle
275
+ })
272
276
  })), tag && jsx("span", Object.assign({
273
277
  className: "tag"
274
278
  }, {
@@ -287,7 +291,9 @@ var SelectorNode = function SelectorNode(props) {
287
291
  children: [mainTitle && jsx("span", Object.assign({
288
292
  className: "main-title"
289
293
  }, {
290
- children: mainTitle
294
+ children: jsx(AutoTips, {
295
+ children: mainTitle
296
+ })
291
297
  })), tag && jsx("span", Object.assign({
292
298
  className: "tag"
293
299
  }, {
@@ -296,7 +302,9 @@ var SelectorNode = function SelectorNode(props) {
296
302
  })), subTitle && jsx("div", Object.assign({
297
303
  className: "sub-title"
298
304
  }, {
299
- children: subTitle
305
+ children: jsx(AutoTips, {
306
+ children: subTitle
307
+ })
300
308
  }))]
301
309
  }));
302
310
  }
@@ -43,6 +43,8 @@ export interface SelectorPickerProps extends HelperTextDetailProps {
43
43
  onChange?: (val: Record<string, any>[] | Record<string, any> | null, node: Record<string, any>, rowData: Record<string, any>) => void;
44
44
  /** 选择器属性 */
45
45
  selectorProps?: Omit<SelectorProps, 'layout' | 'disabled' | 'value' | 'defaultValue' | 'disabled' | 'onChange' | 'selectMode'>;
46
+ /** 浮层渲染容器 */
47
+ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
46
48
  }
47
49
  declare const SelectorPicker: React.FC<SelectorPickerProps>;
48
50
  export default SelectorPicker;
@@ -79,7 +79,8 @@ var SelectorPicker = function SelectorPicker(props) {
79
79
  selectorProps = props.selectorProps,
80
80
  onChange = props.onChange,
81
81
  onClear = props.onClear,
82
- tagRender = props.tagRender;
82
+ tagRender = props.tagRender,
83
+ getPopupContainer = props.getPopupContainer;
83
84
  var fieldConfigHand = handFieldConfig((_a = props.selectorProps) === null || _a === void 0 ? void 0 : _a.fieldConfig, ((_b = props.selectorProps) === null || _b === void 0 ? void 0 : _b.rowKey) || 'key'); // 字段配置,对应数据字段
84
85
 
85
86
  var selectorFieldConfigHand = Object.assign(Object.assign({}, fieldConfigHand), (_c = props.selectorProps) === null || _c === void 0 ? void 0 : _c.backDataFieldConfig); // 选中值字段配置,对应数据字段
@@ -325,7 +326,8 @@ var SelectorPicker = function SelectorPicker(props) {
325
326
  onVisibleChange: function onVisibleChange(vis) {
326
327
  return setOpen(vis);
327
328
  },
328
- overlayClassName: $prefixCls + '-selector-picker-dropdown'
329
+ overlayClassName: $prefixCls + '-selector-picker-dropdown',
330
+ getPopupContainer: getPopupContainer
329
331
  }, {
330
332
  children: renderAnchor()
331
333
  })), jsx(HelperText, {
package/Table/index.js CHANGED
@@ -40,20 +40,20 @@ import 'rc-dropdown';
40
40
  import 'dayjs';
41
41
  import '@para-ui/core/GlobalContext';
42
42
  import '@para-ui/icons/More';
43
- import 'rc-pagination';
44
- import '@para-ui/icons/DoubleLeft';
45
- import '@para-ui/icons/DoubleRight';
46
- import '@para-ui/icons/Left';
47
- import '@para-ui/icons/Right';
43
+ import '../TextField/index.js';
44
+ import '@para-ui/icons/PreviewClose';
45
+ import '@para-ui/icons/PreviewOpen';
46
+ import '@para-ui/icons/CloseCircle';
47
+ import '../HelperText/index.js';
48
48
  import '../Select/index.js';
49
49
  import '@para-ui/icons/Close';
50
- import '@para-ui/icons/CloseCircle';
51
50
  import '@para-ui/icons/Check';
52
51
  import '@para-ui/icons/Search';
53
- import '../HelperText/index.js';
54
- import '../TextField/index.js';
55
- import '@para-ui/icons/PreviewClose';
56
- import '@para-ui/icons/PreviewOpen';
52
+ import '@para-ui/icons/DoubleLeft';
53
+ import '@para-ui/icons/Left';
54
+ import 'rc-pagination';
55
+ import '@para-ui/icons/Right';
56
+ import '@para-ui/icons/DoubleRight';
57
57
 
58
58
  /**
59
59
  * 发送请求
@@ -1193,7 +1193,8 @@ var TableBody = function TableBody(props) {
1193
1193
  _onRefresh = props.onRefresh,
1194
1194
  posFixed = props.posFixed,
1195
1195
  beyondText = props.beyondText,
1196
- onClickRow = props.onClickRow;
1196
+ onClickRow = props.onClickRow,
1197
+ rowClassMapping = props.rowClassMapping;
1197
1198
 
1198
1199
  var _useState = useState(0),
1199
1200
  _useState2 = _slicedToArray(_useState, 2),
@@ -1599,11 +1600,11 @@ var TableBody = function TableBody(props) {
1599
1600
  colSpan: colSpan,
1600
1601
  style: handStyle(item)
1601
1602
  }, {
1602
- children: jsx(AutoTips, Object.assign({
1603
+ children: item.autoTips === undefined || item.autoTips === true ? jsx(AutoTips, Object.assign({
1603
1604
  beyondText: item.beyondText === undefined ? beyondText : item.beyondText
1604
1605
  }, {
1605
1606
  children: text
1606
- }))
1607
+ })) : text
1607
1608
  }), item.name || index);
1608
1609
  });
1609
1610
  }, [tableCell, headData, align, formatter, orderFieldArr, orderTypeArr, sortTable, showColumns, operate, beyondText, fixedColumn]); // 操作栏useCallback
@@ -1698,9 +1699,15 @@ var TableBody = function TableBody(props) {
1698
1699
  var TableBodySubjectContentMemo = useMemo(function () {
1699
1700
  return jsx(Fragment, {
1700
1701
  children: rowData.map(function (row, index) {
1702
+ var str = 'table-body-row';
1703
+
1704
+ if (rowClassMapping && rowClassMapping[row[rowKey]]) {
1705
+ str += ' ' + rowClassMapping[row[rowKey]];
1706
+ }
1707
+
1701
1708
  return jsxs(Fragment$1, {
1702
1709
  children: [jsxs(TrElement, Object.assign({
1703
- className: "table-body-row",
1710
+ className: str,
1704
1711
  onClick: function onClick(e) {
1705
1712
  onClickRow && onClickRow(row, e);
1706
1713
  }
@@ -1710,13 +1717,13 @@ var TableBody = function TableBody(props) {
1710
1717
  }, index);
1711
1718
  })
1712
1719
  });
1713
- }, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, disabledExpandJson, onExpand, disabledArrStatus, showColumns, onClickRow]); // 内容memo
1720
+ }, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, disabledExpandJson, onExpand, disabledArrStatus, showColumns, onClickRow, rowClassMapping]); // 内容memo
1714
1721
 
1715
1722
  var TableBodyContentMemo = useMemo(function () {
1716
1723
  return jsxs(Fragment$1, {
1717
1724
  children: [TableBodySubjectContentMemo, MoreMemo]
1718
1725
  });
1719
- }, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, loadMore, loadMoreRender, onClickMore, changePage, loadMoreUrl, disabledExpandJson, onExpand, showMoreBtn, disabledArrStatus, showColumns, onClickRow]); // 处理内容
1726
+ }, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, loadMore, loadMoreRender, onClickMore, changePage, loadMoreUrl, disabledExpandJson, onExpand, showMoreBtn, disabledArrStatus, showColumns, onClickRow, rowClassMapping]); // 处理内容
1720
1727
 
1721
1728
  var handContent = function handContent() {
1722
1729
  // 无数据,且不再请求,显示暂无数据
@@ -1733,6 +1740,7 @@ var TableBody = function TableBody(props) {
1733
1740
 
1734
1741
  var TableHead = function TableHead(props) {
1735
1742
  var paginationType = props.paginationType,
1743
+ flippingArrow = props.flippingArrow,
1736
1744
  autoPagination = props.autoPagination,
1737
1745
  total = props.total,
1738
1746
  page = props.page,
@@ -1756,6 +1764,7 @@ var TableHead = function TableHead(props) {
1756
1764
  children: jsx(Pagination, {
1757
1765
  type: paginationType,
1758
1766
  autoType: autoPagination,
1767
+ flippingArrow: flippingArrow,
1759
1768
  total: total,
1760
1769
  page: page,
1761
1770
  rowsPerPage: rowsPerPage,
@@ -1832,7 +1841,9 @@ var Table = function Table(propsInit) {
1832
1841
  props.fixedColumn = false;
1833
1842
  }
1834
1843
 
1835
- var url = props.url,
1844
+ var className = props.className,
1845
+ style = props.style,
1846
+ url = props.url,
1836
1847
  ctx = props.ctx,
1837
1848
  emptyProps = props.emptyProps,
1838
1849
  _props$method = props.method,
@@ -1849,6 +1860,7 @@ var Table = function Table(propsInit) {
1849
1860
  pagination = _props$pagination === void 0 ? true : _props$pagination,
1850
1861
  _props$paginationType = props.paginationType,
1851
1862
  paginationType = _props$paginationType === void 0 ? 'complex' : _props$paginationType,
1863
+ flippingArrow = props.flippingArrow,
1852
1864
  _props$autoPagination = props.autoPagination,
1853
1865
  autoPagination = _props$autoPagination === void 0 ? true : _props$autoPagination,
1854
1866
  tableCell = props.tableCell,
@@ -1906,8 +1918,6 @@ var Table = function Table(propsInit) {
1906
1918
  _props$defaultExpandA = props.defaultExpandAllRows,
1907
1919
  defaultExpandAllRows = _props$defaultExpandA === void 0 ? false : _props$defaultExpandA,
1908
1920
  onClickColumns = props.onClickColumns,
1909
- className = props.className,
1910
- style = props.style,
1911
1921
  _props$beyondText = props.beyondText,
1912
1922
  beyondText = _props$beyondText === void 0 ? true : _props$beyondText,
1913
1923
  loading = props.loading,
@@ -1915,7 +1925,8 @@ var Table = function Table(propsInit) {
1915
1925
  defaultFilterValue = props.defaultFilterValue,
1916
1926
  searchKeyName = props.searchKeyName,
1917
1927
  filterSearchCallback = props.filterSearchCallback,
1918
- onClickRow = props.onClickRow;
1928
+ onClickRow = props.onClickRow,
1929
+ rowClassMapping = props.rowClassMapping;
1919
1930
  var intl = useFormatMessage('Table', localeJson);
1920
1931
  var dayNum = props.expirationTime ? props.expirationTime === 0 ? 100000000 : props.expirationTime : 7; // 过期天数
1921
1932
 
@@ -3266,14 +3277,16 @@ var Table = function Table(propsInit) {
3266
3277
  beyondText: beyondText,
3267
3278
  fixedColumn: fixedColumn,
3268
3279
  fixedTable: fixedTable,
3269
- onClickRow: onClickRow
3280
+ onClickRow: onClickRow,
3281
+ rowClassMapping: rowClassMapping
3270
3282
  });
3271
- }, [showColumns, formatter, rowKey, rowData, headDataCom, expandable, check, radio, checkJson, sortTable, orderTypeArr, orderFieldArr, radioValue, disabledJson, align, tableCell, operate, setRadio, setCheck, totalDataJson, loadMore, loadMoreRender, onClickMore, total, pageCom, sizeCom, loadMoreUrl, expandValue, expandMultiple, disabledExpand, onExpand, defaultExpandAllRows, loadState, emptyProps, url, disabledArrStatus, posFixed, beyondText, fixedTable, fixedColumn, onClickRow]); // 表格分页memo
3283
+ }, [showColumns, formatter, rowKey, rowData, headDataCom, expandable, check, radio, checkJson, sortTable, orderTypeArr, orderFieldArr, radioValue, disabledJson, align, tableCell, operate, setRadio, setCheck, totalDataJson, loadMore, loadMoreRender, onClickMore, total, pageCom, sizeCom, loadMoreUrl, expandValue, expandMultiple, disabledExpand, onExpand, defaultExpandAllRows, loadState, emptyProps, url, disabledArrStatus, posFixed, beyondText, fixedTable, fixedColumn, onClickRow, rowClassMapping]); // 表格分页memo
3272
3284
 
3273
3285
  var TablePaginationMemo = useMemo(function () {
3274
3286
  if (constData.current.page === null || constData.current.size === null || loadMore) return;
3275
3287
  return pagination && jsx(TableHead, {
3276
3288
  paginationType: paginationType,
3289
+ flippingArrow: flippingArrow,
3277
3290
  autoPagination: autoPagination,
3278
3291
  total: total,
3279
3292
  page: pageCom,
@@ -3282,7 +3295,7 @@ var Table = function Table(propsInit) {
3282
3295
  changePage: changePage,
3283
3296
  changeRowsPerPage: changeRowsPerPage
3284
3297
  });
3285
- }, [total, pageCom, sizeCom, sizeArrCom, pagination, loadMore, autoPagination, paginationType]); // 表格内容滚动
3298
+ }, [total, pageCom, sizeCom, sizeArrCom, pagination, loadMore, autoPagination, paginationType, flippingArrow]); // 表格内容滚动
3286
3299
 
3287
3300
  var tableBoxScroll = function tableBoxScroll(e) {
3288
3301
  var dom = tableRef.current;
@@ -6,6 +6,7 @@
6
6
  import React, { ReactNode } from 'react';
7
7
  import { EmptyProps } from "../Empty";
8
8
  import { OperateBtnProps } from "../OperateBtn";
9
+ import { PaginationFlippingArrow, PaginationLayout } from "../Pagination";
9
10
  /** 任意类型 */
10
11
  export interface Anyjson {
11
12
  [name: string]: any;
@@ -52,6 +53,8 @@ export interface HeadDataProps {
52
53
  width?: string | number;
53
54
  /** 超出内容显示文字还是dom */
54
55
  beyondText?: boolean;
56
+ /** 超出不显示... */
57
+ autoTips?: boolean;
55
58
  /** 排序,请求才有 */
56
59
  orderNum?: number;
57
60
  [name: string]: any;
@@ -149,7 +152,9 @@ export interface TableProps extends TableHeadBodyPublicProps {
149
152
  /** 是否分页 */
150
153
  pagination?: boolean;
151
154
  /** 分页模式 */
152
- paginationType?: 'simple' | 'complex';
155
+ paginationType?: 'simple' | 'complex' | PaginationLayout[];
156
+ /** 方向键layout,默认全有 */
157
+ flippingArrow?: PaginationFlippingArrow[];
153
158
  /** 自适应分页,根据外容器大小,改变分页模式 */
154
159
  autoPagination?: boolean;
155
160
  /** 渲染表格一行数据 (跟表格头部head里面的render参数互斥) */
@@ -214,6 +219,10 @@ export interface TableProps extends TableHeadBodyPublicProps {
214
219
  paramsCallback?: (data: any, cb: (handObj: ReqProps) => void) => void;
215
220
  /** 用来格式化内容 */
216
221
  formatter?: (row: any, item: any, val: any, index: number, rowIndex: number) => ReactNode;
222
+ /** 行class mapping */
223
+ rowClassMapping?: {
224
+ [name: string]: string;
225
+ };
217
226
  /** 展开事件 */
218
227
  onExpand?: (row: any, status: ExpandableStatus) => void;
219
228
  /** 点击加载更多 */
@@ -14,6 +14,10 @@ export interface TableBodyProps extends TableHeadBodyPublicProps {
14
14
  emptyProps?: EmptyProps;
15
15
  /** 当前表格页数据 */
16
16
  rowData?: any[];
17
+ /** 行class mapping */
18
+ rowClassMapping?: {
19
+ [name: string]: string;
20
+ };
17
21
  /** 渲染表格一行数据 (跟表格头部head里面的render参数互斥) */
18
22
  tableCell?: (row: any, params: any) => ReactNode;
19
23
  /** 禁用key的map */
@@ -4,6 +4,6 @@
4
4
  * @description 表格分页
5
5
  */
6
6
  import { FunctionComponent } from 'react';
7
- import { TablePaginationProps } from './tablePaginationInterFace';
7
+ import { TablePaginationProps } from './tablePaginationInterface';
8
8
  export declare const TableHead: FunctionComponent<TablePaginationProps>;
9
9
  export default TableHead;
@@ -3,12 +3,15 @@
3
3
  * @date 2021/8/6 11:07
4
4
  * @description 表格分页参数
5
5
  */
6
+ import { PaginationFlippingArrow, PaginationLayout } from "../Pagination";
6
7
  /** 表格分页参数 */
7
8
  export interface TablePaginationProps {
8
9
  /** 自适应分页,根据外容器大小,改变分页模式 */
9
10
  autoPagination?: boolean;
10
11
  /** 分页模式 */
11
- paginationType?: 'simple' | 'complex';
12
+ paginationType?: 'simple' | 'complex' | PaginationLayout[];
13
+ /** 方向键layout,默认全有 */
14
+ flippingArrow?: PaginationFlippingArrow[];
12
15
  /** 总条数 */
13
16
  total?: number;
14
17
  /** 当前页 */
package/Transfer/index.js CHANGED
@@ -3172,7 +3172,7 @@ var Box = function Box(props) {
3172
3172
  if (item.disabled) return;
3173
3173
  onchange(e, !item.checked, index, direction, multiple);
3174
3174
  }, function (e, index, item) {
3175
- if (item.disabled) return;
3175
+ if (item === null || item === void 0 ? void 0 : item.disabled) return;
3176
3176
  onchange(e, true, index, direction, false);
3177
3177
  onMove(direction === "right" ? 'left' : 'right');
3178
3178
  });
@@ -3201,10 +3201,10 @@ var Box = function Box(props) {
3201
3201
  ref: ref
3202
3202
  }, {
3203
3203
  children: data.map(function (item, index) {
3204
- if (item.hide) return null;
3204
+ if (item === null || item === void 0 ? void 0 : item.hide) return null;
3205
3205
  return jsxs("div", Object.assign({
3206
- className: clsx('item', item.disabled && 'item-disabled', item.checked && 'item-checked', fluctuationPosition === index && 'item-fluctuation', fluctuationOrther === index && 'item-fluctuationOrther'),
3207
- style: item.tagColor ? {
3206
+ className: clsx('item', (item === null || item === void 0 ? void 0 : item.disabled) && 'item-disabled', (item === null || item === void 0 ? void 0 : item.checked) && 'item-checked', fluctuationPosition === index && 'item-fluctuation', fluctuationOrther === index && 'item-fluctuationOrther'),
3207
+ style: (item === null || item === void 0 ? void 0 : item.tagColor) ? {
3208
3208
  borderLeft: "4px solid ".concat(item.tagColor)
3209
3209
  } : undefined,
3210
3210
  onClick: function onClick(e) {
@@ -3215,7 +3215,7 @@ var Box = function Box(props) {
3215
3215
  className: 'item-label'
3216
3216
  }, {
3217
3217
  children: jsx(AutoTips, {
3218
- children: item.name || item[item[customKey]]
3218
+ children: (item === null || item === void 0 ? void 0 : item.name) || item[item[customKey]]
3219
3219
  })
3220
3220
  })), rightIcon ? jsx("div", Object.assign({
3221
3221
  className: 'right-icon'
@@ -3506,13 +3506,15 @@ var Transfer = function Transfer(props) {
3506
3506
  useEffect(function () {
3507
3507
  var rData = [];
3508
3508
  var lData = [];
3509
+ value === null || value === void 0 ? void 0 : value.forEach(function (item) {
3510
+ if (transData[item]) {
3511
+ rData.push(transData[item]);
3512
+ delete transData[item];
3513
+ }
3514
+ });
3509
3515
 
3510
3516
  for (var key in transData) {
3511
- if (value && value.indexOf(key) >= 0) {
3512
- rData.push(transData[key]);
3513
- } else {
3514
- lData.push(transData[key]);
3515
- }
3517
+ lData.push(transData[key]);
3516
3518
  }
3517
3519
 
3518
3520
  setRightData([].concat(rData));
package/index.js CHANGED
@@ -20,7 +20,7 @@ export { Drawer } from './Drawer/index.js';
20
20
  export { D as Dropdown } from './_verture/index-bbed73a3.js';
21
21
  export { default as Empty } from './Empty/index.js';
22
22
  export { default as Form } from './Form/index.js';
23
- export { F as FormItem } from './_verture/index-c40bd040.js';
23
+ export { F as FormItem } from './_verture/index-48875ffd.js';
24
24
  export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-d646d9db.js';
25
25
  export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
26
26
  export { default as Help } from './Help/index.js';
@@ -134,8 +134,8 @@ import 'rc-dialog';
134
134
  import '@para-ui/icons/WarningCircle';
135
135
  import '@para-ui/icons/PlusCircleF';
136
136
  import 'rc-notification';
137
- import 'rc-pagination';
138
137
  import '@para-ui/icons/Left';
138
+ import 'rc-pagination';
139
139
  import '@para-ui/icons/CheckCircle';
140
140
  import 'rc-progress';
141
141
  import '@para-ui/icons/Check';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "3.0.27",
4
+ "version": "3.0.28",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",