@para-ui/core 4.0.44 → 4.0.46
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/AlignBox/index.d.ts +18 -0
- package/AlignBox/index.js +26 -0
- package/Anchor/index.js +1 -1
- package/Argv/index.js +1 -1
- package/AutoBox/index.js +1 -1
- package/AutoButton/index.js +1 -1
- package/AutoTips/index.js +1 -1
- package/Breadcrumbs/index.js +1 -1
- package/Button/index.js +1 -1
- package/ButtonGroup/index.js +1 -1
- package/Card/index.js +1 -1
- package/Carousel/index.js +1 -1
- package/Cascader/index.js +6 -5
- package/Checkbox/index.js +1 -1
- package/CheckboxGroup/index.js +1 -1
- package/CodeEditor/index.js +1 -1
- package/CollapseLayout/index.d.ts +3 -1
- package/CollapseLayout/index.js +4 -2
- package/ComboSelect/index.js +4 -3
- package/CopyText/index.js +1 -1
- package/CycleSelector/index.js +6 -3
- package/DatePicker/index.js +6 -2
- package/Descriptions/index.js +1 -1
- package/Desktop/index.js +1 -1
- package/DragVerify/index.js +1 -1
- package/Drawer/index.js +1 -1
- package/DynamicMultiBox/index.js +4 -3
- package/Form/index.js +5 -4
- package/FormItem/index.js +5 -4
- package/FunctionModal/index.js +3 -3
- package/GlobalContext/componentsProps.d.ts +4 -0
- package/Help/index.js +2 -2
- package/Image/index.js +4 -3
- package/InputCode/index.js +1 -1
- package/InputLang/index.js +1 -1
- package/InputNumber/index.js +1 -1
- package/Label/index.js +1 -1
- package/Menu/index.js +1 -1
- package/Modal/index.js +1 -1
- package/MultiBox/index.js +1 -1
- package/OperateBtn/index.js +1 -1
- package/PageHeader/index.js +1 -1
- package/Pagination/index.d.ts +2 -0
- package/Pagination/index.js +109 -62
- package/PopConfirm/index.js +1 -1
- package/PopMenu/index.js +1 -1
- package/Popover/index.js +1 -1
- package/Progress/index.js +1 -1
- package/QuickReply/index.js +1 -1
- package/README.md +16 -0
- package/Radio/index.js +1 -1
- package/RadioGroup/index.js +1 -1
- package/RangeInput/index.js +1 -1
- package/Result/index.js +1 -1
- package/Search/index.js +1 -1
- package/Select/index.js +1 -1
- package/SelectInput/index.js +1 -1
- package/Selector/index.js +1 -1
- package/SelectorPicker/index.js +1 -1
- package/SingleBox/index.js +1 -1
- package/Slider/index.js +1 -1
- package/Stepper/index.js +1 -1
- package/Switch/index.js +1 -1
- package/Table/index.js +10 -6
- package/Table/interface.d.ts +2 -0
- package/Table/tablePaginationInterface.d.ts +2 -0
- package/Tabs/index.js +1 -1
- package/Tag/TagGroup.d.ts +4 -0
- package/Tag/index.d.ts +4 -0
- package/Tag/index.js +110 -63
- package/TextEditor/index.js +4 -4
- package/TextField/index.js +1 -1
- package/TimePicker/index.js +6 -2
- package/Timeline/index.js +3 -2
- package/Title/index.js +1 -1
- package/ToggleButton/index.js +3 -2
- package/Tooltip/index.js +1 -1
- package/Transfer/index.js +1 -1
- package/Tree/index.js +5 -4
- package/Upload/index.js +4 -3
- package/_verture/{Portal-42560ff0.js → Portal-f9bedb3a.js} +2 -1
- package/_verture/{defineProperty-f0e15205.js → defineProperty-6f62bb2a.js} +2 -10
- package/_verture/{index-5f0bfdcf.js → index-6647cbf6.js} +3 -2
- package/_verture/{index-3fcb421f.js → index-972707a5.js} +4 -3
- package/_verture/{modalContext-369509dd.js → modalContext-8a48c400.js} +1 -1
- package/_verture/{tslib.es6-f43aa41d.js → tslib.es6-55ed4bd2.js} +1 -1
- package/_verture/typeof-adeedc13.js +11 -0
- package/index.d.ts +2 -0
- package/index.js +11 -9
- package/package.json +1 -1
- package/umd/AlignBox.js +1 -0
- package/umd/Anchor.js +1 -1
- package/umd/Argv.js +1 -1
- package/umd/Checkbox.js +1 -1
- package/umd/CheckboxGroup.js +1 -1
- package/umd/CollapseLayout.js +1 -1
- package/umd/ComboSelect.js +2 -2
- package/umd/CopyText.js +1 -1
- package/umd/CycleSelector.js +2 -2
- package/umd/DatePicker.js +2 -2
- package/umd/Descriptions.js +1 -1
- package/umd/Desktop.js +1 -1
- package/umd/DynamicMultiBox.js +5 -5
- package/umd/Form.js +2 -2
- package/umd/FormItem.js +2 -2
- package/umd/Help.js +1 -1
- package/umd/InputCode.js +1 -1
- package/umd/InputLang.js +1 -1
- package/umd/InputNumber.js +1 -1
- package/umd/Label.js +1 -1
- package/umd/MultiBox.js +1 -1
- package/umd/Pagination.js +2 -2
- package/umd/PopMenu.js +1 -1
- package/umd/QuickReply.js +1 -1
- package/umd/Radio.js +1 -1
- package/umd/RadioGroup.js +1 -1
- package/umd/RangeInput.js +1 -1
- package/umd/Search.js +1 -1
- package/umd/Select.js +1 -1
- package/umd/SelectInput.js +1 -1
- package/umd/Selector.js +1 -1
- package/umd/SelectorPicker.js +1 -1
- package/umd/SingleBox.js +1 -1
- package/umd/Switch.js +1 -1
- package/umd/Table.js +3 -3
- package/umd/Tabs.js +1 -1
- package/umd/Tag.js +6 -6
- package/umd/TextEditor.js +1 -1
- package/umd/TextField.js +1 -1
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +1 -1
- package/umd/Transfer.js +1 -1
- package/umd/Tree.js +1 -1
- /package/_verture/{index-fd0727b2.js → index-bc7b7394.js} +0 -0
package/Pagination/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import DoubleLeft from '@para-ui/icons/DoubleLeft';
|
|
|
13
13
|
import DoubleRight from '@para-ui/icons/DoubleRight';
|
|
14
14
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
15
15
|
import '@paraview/lib';
|
|
16
|
-
import '../_verture/tslib.es6-
|
|
16
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
17
17
|
import '../Label/index.js';
|
|
18
18
|
import '../Help/index.js';
|
|
19
19
|
import '../Tooltip/index.js';
|
|
@@ -64,7 +64,7 @@ var localeJson = {
|
|
|
64
64
|
en
|
|
65
65
|
};
|
|
66
66
|
|
|
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
|
|
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}\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 .total-num {\n height: 32px;\n line-height: 32px;\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 display: flex;\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}";
|
|
68
68
|
styleInject(css_248z);
|
|
69
69
|
|
|
70
70
|
const Pagination = props => {
|
|
@@ -83,34 +83,33 @@ const Pagination = props => {
|
|
|
83
83
|
skipFunc,
|
|
84
84
|
changePage,
|
|
85
85
|
changeRowsPerPage,
|
|
86
|
-
getPopupContainer
|
|
86
|
+
getPopupContainer,
|
|
87
|
+
resizeLine
|
|
87
88
|
} = props;
|
|
89
|
+
const intl = useFormatMessage('Pagination', localeJson);
|
|
88
90
|
const {
|
|
89
91
|
language,
|
|
90
92
|
locale
|
|
91
93
|
} = React__default.useContext(GlobalContext);
|
|
92
|
-
const intl = useFormatMessage('Pagination', localeJson);
|
|
93
94
|
const [currentRowsPerPageCom, setCurrentRowsPerPageCom] = useState(currentRowsPerPage); // 当前选中每页行数
|
|
94
95
|
const [rowsPerPageCom, setRowsPerPageCom] = useState([]); // 每页显示的行数
|
|
95
96
|
const [pageCom, setPageCom] = useState(page); // 当前页数
|
|
96
97
|
const [totalPage, setTotalPage] = useState(); // 总页数
|
|
97
98
|
const [skipValue, setSkipValue] = useState(); // 跳转页数
|
|
98
|
-
const [
|
|
99
|
-
const refDom = useRef();
|
|
100
|
-
const constData = useRef({
|
|
99
|
+
const [morePos, setMorePos] = useState(null); // 超出在原始位置
|
|
100
|
+
const refDom = useRef(null);
|
|
101
|
+
const constData = useRef({
|
|
102
|
+
layoutArr: ['jumper', 'pageRow', 'pager-btn', 'sizes', 'pager-num']
|
|
103
|
+
});
|
|
101
104
|
constData.current.type = type;
|
|
102
105
|
constData.current.autoType = autoType;
|
|
103
106
|
useEffect(() => {
|
|
104
107
|
return () => {
|
|
105
108
|
window.removeEventListener('resize', changeSize);
|
|
106
109
|
clearTimeout(constData.current.timer);
|
|
107
|
-
clearTimeout(constData.current.timerClass);
|
|
108
110
|
clearTimeout(constData.current.changePagination);
|
|
109
111
|
};
|
|
110
112
|
}, []);
|
|
111
|
-
useEffect(() => {
|
|
112
|
-
setTypeCom(type);
|
|
113
|
-
}, [type]);
|
|
114
113
|
useEffect(() => {
|
|
115
114
|
setPageCom(page);
|
|
116
115
|
}, [page]);
|
|
@@ -151,61 +150,59 @@ const Pagination = props => {
|
|
|
151
150
|
window.addEventListener('resize', changeSize);
|
|
152
151
|
} else {
|
|
153
152
|
window.removeEventListener('resize', changeSize);
|
|
154
|
-
setTypeCom(type);
|
|
155
153
|
}
|
|
156
154
|
}, [type, autoType]);
|
|
157
155
|
useEffect(() => {
|
|
158
156
|
if (constData.current.type === 'complex' && constData.current.autoType) {
|
|
159
|
-
|
|
157
|
+
changeSize();
|
|
160
158
|
}
|
|
161
|
-
}, [total, currentRowsPerPageCom, pageCom, language]);
|
|
162
|
-
/**
|
|
163
|
-
* 改变了分页数据,需要判断当前是否换行了
|
|
164
|
-
* */
|
|
165
|
-
const changePagination = () => {
|
|
166
|
-
clearTimeout(constData.current.changePagination);
|
|
167
|
-
constData.current.changePagination = setTimeout(() => {
|
|
168
|
-
const current = refDom.current;
|
|
169
|
-
const skipDom = current && current.querySelector('.skip-page-memo');
|
|
170
|
-
// 简单模式,不存在跳转
|
|
171
|
-
if (skipDom) {
|
|
172
|
-
// 复杂模式,换行了 -> 变成简单模式
|
|
173
|
-
if (current.offsetTop !== skipDom.offsetTop) {
|
|
174
|
-
setTypeCom('simple');
|
|
175
|
-
}
|
|
176
|
-
} else {
|
|
177
|
-
setTypeCom('complex');
|
|
178
|
-
// 简单模式 -> 复杂, 需要再次判断是否换行了
|
|
179
|
-
changePagination();
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
};
|
|
159
|
+
}, [total, currentRowsPerPageCom, pageCom, language, resizeLine]);
|
|
183
160
|
/** 改变屏幕大小 */
|
|
184
161
|
const changeSize = () => {
|
|
185
162
|
clearTimeout(constData.current.timer);
|
|
186
|
-
clearTimeout(constData.current.timerClass);
|
|
187
163
|
const current = refDom.current;
|
|
188
164
|
if (!current) return;
|
|
189
165
|
current.classList.add("".concat($prefixCls, "-pagination-over"));
|
|
190
166
|
constData.current.timer = setTimeout(() => {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
167
|
+
setMorePos(constData.current.layoutArr.length);
|
|
168
|
+
if (constData.current.layoutArr.length > 1) handMultiline();
|
|
169
|
+
}, 100);
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* 判断是否换行
|
|
173
|
+
* true 换行
|
|
174
|
+
* */
|
|
175
|
+
const isMultiline = () => {
|
|
176
|
+
const arr = ['.total-num', '.component-pagination', '.pagination-btn-content', '.page-line-memo', '.skip-page-memo'];
|
|
177
|
+
let num;
|
|
178
|
+
let bol = false;
|
|
179
|
+
arr.forEach(str => {
|
|
180
|
+
const dom = refDom.current.querySelector(str);
|
|
181
|
+
if (dom) {
|
|
182
|
+
if (num === undefined) {
|
|
183
|
+
num = dom.offsetTop;
|
|
184
|
+
} else {
|
|
185
|
+
if (dom.offsetTop !== num) {
|
|
186
|
+
bol = true;
|
|
187
|
+
}
|
|
199
188
|
}
|
|
200
|
-
} else {
|
|
201
|
-
setTypeCom('complex');
|
|
202
|
-
// 简单模式 -> 复杂, 需要再次判断是否换行了
|
|
203
|
-
changeSize();
|
|
204
189
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
190
|
+
});
|
|
191
|
+
return bol;
|
|
192
|
+
};
|
|
193
|
+
const handMultiline = index => {
|
|
194
|
+
if (index === null || index === 0) return;
|
|
195
|
+
if (index === undefined) index = constData.current.layoutArr.length;
|
|
196
|
+
if (isMultiline()) {
|
|
197
|
+
const num = Number(index) - 1;
|
|
198
|
+
// 超出
|
|
199
|
+
setMorePos(num);
|
|
200
|
+
if (num > 3) handMultiline(num);else refDom.current.classList.remove("".concat($prefixCls, "-pagination-over"));
|
|
201
|
+
} else {
|
|
202
|
+
// 一行
|
|
203
|
+
//if (list.length <= index) handleCloseMore();
|
|
204
|
+
refDom.current.classList.remove("".concat($prefixCls, "-pagination-over"));
|
|
205
|
+
}
|
|
209
206
|
};
|
|
210
207
|
/**
|
|
211
208
|
* 是否存在当前类型
|
|
@@ -213,6 +210,28 @@ const Pagination = props => {
|
|
|
213
210
|
const notLayout = layout => {
|
|
214
211
|
return constData.current.type instanceof Array && constData.current.type.indexOf(layout) === -1;
|
|
215
212
|
};
|
|
213
|
+
/**
|
|
214
|
+
* 判断超出是否显示
|
|
215
|
+
* false 显示
|
|
216
|
+
* true 不显示
|
|
217
|
+
* */
|
|
218
|
+
const overShowDom = type => {
|
|
219
|
+
if (morePos === null) return false;
|
|
220
|
+
switch (type) {
|
|
221
|
+
case 'jumper':
|
|
222
|
+
return morePos <= 0;
|
|
223
|
+
case 'pageRow':
|
|
224
|
+
return morePos <= 1;
|
|
225
|
+
case 'pager-btn':
|
|
226
|
+
return morePos <= 2 || morePos > 4;
|
|
227
|
+
case 'sizes':
|
|
228
|
+
return morePos <= 3;
|
|
229
|
+
case 'pager-num':
|
|
230
|
+
return morePos <= 4;
|
|
231
|
+
default:
|
|
232
|
+
return false;
|
|
233
|
+
}
|
|
234
|
+
};
|
|
216
235
|
// 点击分页
|
|
217
236
|
const clickPage = type => value => {
|
|
218
237
|
let num = pageCom;
|
|
@@ -281,7 +300,7 @@ const Pagination = props => {
|
|
|
281
300
|
};
|
|
282
301
|
/* 总数量 */
|
|
283
302
|
const TotalMemo = useMemo(() => {
|
|
284
|
-
if (
|
|
303
|
+
if (type === 'simple' || notLayout('sizes') || overShowDom('sizes')) {
|
|
285
304
|
return null;
|
|
286
305
|
}
|
|
287
306
|
// 共{total}条
|
|
@@ -295,10 +314,10 @@ const Pagination = props => {
|
|
|
295
314
|
total: totalFormat
|
|
296
315
|
})
|
|
297
316
|
}));
|
|
298
|
-
}, [total, language, locale,
|
|
317
|
+
}, [total, language, locale, morePos]);
|
|
299
318
|
/* 每页行数 */
|
|
300
319
|
const PageLineMemo = useMemo(() => {
|
|
301
|
-
if (notLayout('pageRow')) {
|
|
320
|
+
if (notLayout('pageRow') || overShowDom('pageRow')) {
|
|
302
321
|
return null;
|
|
303
322
|
}
|
|
304
323
|
return jsx("div", Object.assign({
|
|
@@ -315,7 +334,7 @@ const Pagination = props => {
|
|
|
315
334
|
getPopupContainer: getPopupContainer
|
|
316
335
|
})
|
|
317
336
|
}));
|
|
318
|
-
}, [rowsPerPageCom, currentRowsPerPageCom, getPopupContainer, language, locale,
|
|
337
|
+
}, [rowsPerPageCom, currentRowsPerPageCom, getPopupContainer, language, locale, morePos]);
|
|
319
338
|
/** 分页上一页 */
|
|
320
339
|
const jumpPrevIcon = () => {
|
|
321
340
|
return jsxs("div", Object.assign({
|
|
@@ -336,9 +355,23 @@ const Pagination = props => {
|
|
|
336
355
|
}), jsx(DoubleRight, {})]
|
|
337
356
|
}));
|
|
338
357
|
};
|
|
358
|
+
/**
|
|
359
|
+
* 判断显示分页
|
|
360
|
+
* true 不显示
|
|
361
|
+
* */
|
|
362
|
+
const isPaginationMemo = () => {
|
|
363
|
+
if (pagerType !== 'num') return true;
|
|
364
|
+
if (type === 'simple') {
|
|
365
|
+
return true;
|
|
366
|
+
} else if (type === 'complex') {
|
|
367
|
+
return overShowDom('pager-num');
|
|
368
|
+
} else {
|
|
369
|
+
return notLayout('pager');
|
|
370
|
+
}
|
|
371
|
+
};
|
|
339
372
|
/* 页码 */
|
|
340
373
|
const PaginationMemo = useMemo(() => {
|
|
341
|
-
if (
|
|
374
|
+
if (isPaginationMemo()) {
|
|
342
375
|
return null;
|
|
343
376
|
}
|
|
344
377
|
return jsxs("div", Object.assign({
|
|
@@ -373,10 +406,24 @@ const Pagination = props => {
|
|
|
373
406
|
}))
|
|
374
407
|
}))]
|
|
375
408
|
}));
|
|
376
|
-
}, [total, pageCom, totalPage, currentRowsPerPageCom,
|
|
409
|
+
}, [total, pageCom, totalPage, currentRowsPerPageCom, props.flippingArrow, pagerType, morePos]);
|
|
410
|
+
/**
|
|
411
|
+
* 判断显示按钮分页
|
|
412
|
+
* true 不显示
|
|
413
|
+
* */
|
|
414
|
+
const isPaginationBtnMemo = () => {
|
|
415
|
+
if (pagerType === 'btn') return false;
|
|
416
|
+
if (type === 'simple') {
|
|
417
|
+
return false;
|
|
418
|
+
} else if (type === 'complex') {
|
|
419
|
+
return overShowDom('pager-btn');
|
|
420
|
+
} else {
|
|
421
|
+
return notLayout('pager');
|
|
422
|
+
}
|
|
423
|
+
};
|
|
377
424
|
/** 页码btn */
|
|
378
425
|
const PaginationBtnMemo = useMemo(() => {
|
|
379
|
-
if (
|
|
426
|
+
if (isPaginationBtnMemo()) {
|
|
380
427
|
return null;
|
|
381
428
|
}
|
|
382
429
|
return jsxs("div", Object.assign({
|
|
@@ -404,10 +451,10 @@ const Pagination = props => {
|
|
|
404
451
|
})
|
|
405
452
|
}))]
|
|
406
453
|
}));
|
|
407
|
-
}, [pageCom, totalPage, pagerType,
|
|
454
|
+
}, [pageCom, totalPage, pagerType, locale, morePos]);
|
|
408
455
|
/* 跳转页数 */
|
|
409
456
|
const SkipPageMemo = useMemo(() => {
|
|
410
|
-
if (notLayout('jumper')) {
|
|
457
|
+
if (notLayout('jumper') || overShowDom('jumper')) {
|
|
411
458
|
return null;
|
|
412
459
|
}
|
|
413
460
|
return jsxs("div", Object.assign({
|
|
@@ -432,7 +479,7 @@ const Pagination = props => {
|
|
|
432
479
|
})]
|
|
433
480
|
})]
|
|
434
481
|
}));
|
|
435
|
-
}, [skipValue, totalPage, language, locale,
|
|
482
|
+
}, [skipValue, totalPage, language, locale, morePos]);
|
|
436
483
|
// 处理class
|
|
437
484
|
const handClass = () => {
|
|
438
485
|
let str = "".concat($prefixCls, "-pagination");
|
package/PopConfirm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useMemo, useEffect } from 'react';
|
|
4
4
|
import CheckCircleF from '@para-ui/icons/CheckCircleF';
|
package/PopMenu/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import React__default, { useState, useRef, useEffect } from 'react';
|
package/Popover/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import React__default, { useEffect } from 'react';
|
|
4
4
|
import { Tooltip } from '../Tooltip/index.js';
|
package/Progress/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { Circle } from 'rc-progress';
|
|
4
4
|
import CheckCircleF from '@para-ui/icons/CheckCircleF';
|
package/QuickReply/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import { Popover } from '../Popover/index.js';
|
|
|
20
20
|
import Message from '@para-ui/icons/Message';
|
|
21
21
|
import Set from '@para-ui/icons/Set';
|
|
22
22
|
import '../_verture/sortable.esm-76fe46a4.js';
|
|
23
|
-
import '../_verture/tslib.es6-
|
|
23
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
24
24
|
import '@para-ui/icons/LoadingF';
|
|
25
25
|
import '../Tooltip/index.js';
|
|
26
26
|
import 'rc-tooltip';
|
package/README.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 🎉 para-ui/core@4.0.46 发布
|
|
2
|
+
|
|
3
|
+
🎁【Feature】
|
|
4
|
+
- 【对齐容器-Align】新增组件-对齐容器
|
|
5
|
+
|
|
6
|
+
🔧【Bugfix】
|
|
7
|
+
- 【标签-Tag】新增marginBottom,marginRight参数,tag默认没有,tagGroup默认8px
|
|
8
|
+
- 【帮助-Help】帮助组件设置line-height为0,让容器与图标一样高度
|
|
9
|
+
|
|
10
|
+
## 🎉 para-ui/core@4.0.45 发布
|
|
11
|
+
|
|
12
|
+
🔧【Bugfix】
|
|
13
|
+
- 【分页-Pagination】重构复杂模式下,超出换行显示内容,逐个减少
|
|
14
|
+
- 【表格-Table】增加resizePaginationLine参数,重新计算分页换行不换行
|
|
15
|
+
- 【分栏收缩容器-CollapseLayout】onClickBtn增加duration动画时间参数,新增onDragEnd拖拽结束事件
|
|
16
|
+
|
|
1
17
|
## 🎉 para-ui/core@4.0.44 发布
|
|
2
18
|
|
|
3
19
|
🎁【Feature】
|
package/Radio/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import Label from '../Label/index.js';
|
|
|
4
4
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
5
5
|
import { Tooltip } from '../Tooltip/index.js';
|
|
6
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
|
-
import '../_verture/tslib.es6-
|
|
7
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
8
8
|
import '../Help/index.js';
|
|
9
9
|
import '@para-ui/icons/Help';
|
|
10
10
|
import 'clsx';
|
package/RadioGroup/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import HelperText from '../HelperText/index.js';
|
|
|
6
6
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
7
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
8
|
import '../Tooltip/index.js';
|
|
9
|
-
import '../_verture/tslib.es6-
|
|
9
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
10
10
|
import 'rc-tooltip';
|
|
11
11
|
import 'rc-tooltip/lib/placements';
|
|
12
12
|
import 'clsx';
|
package/RangeInput/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import clsx from 'clsx';
|
|
|
8
8
|
import { Tooltip } from '../Tooltip/index.js';
|
|
9
9
|
import { DeepClone } from '@paraview/lib';
|
|
10
10
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
11
|
-
import '../_verture/tslib.es6-
|
|
11
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
12
12
|
import '../Help/index.js';
|
|
13
13
|
import '@para-ui/icons/Help';
|
|
14
14
|
import 'rc-tooltip';
|
package/Result/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
|
8
8
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import '../Tooltip/index.js';
|
|
11
|
-
import '../_verture/tslib.es6-
|
|
11
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
12
12
|
import 'rc-tooltip';
|
|
13
13
|
import 'rc-tooltip/lib/placements';
|
|
14
14
|
import '@para-ui/icons/Forbid';
|
package/Search/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { TextField } from '../TextField/index.js';
|
|
|
4
4
|
import SearchIcon from '@para-ui/icons/Search';
|
|
5
5
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
6
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
|
-
import '../_verture/tslib.es6-
|
|
7
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
8
8
|
import '../Label/index.js';
|
|
9
9
|
import '../Help/index.js';
|
|
10
10
|
import '../Tooltip/index.js';
|
package/Select/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import { u as useGlobalProps } from '../_verture/useGlobalProps-4ae1a007.js';
|
|
|
20
20
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
21
21
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
22
22
|
import 'clsx';
|
|
23
|
-
import '../_verture/tslib.es6-
|
|
23
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
24
24
|
import '../Help/index.js';
|
|
25
25
|
import '@para-ui/icons/Help';
|
|
26
26
|
import 'rc-tooltip';
|
package/SelectInput/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import '@paraview/lib';
|
|
|
10
10
|
import '../_verture/useGlobalProps-4ae1a007.js';
|
|
11
11
|
import '../_verture/style-inject.es-300983ab.js';
|
|
12
12
|
import '../Label/index.js';
|
|
13
|
-
import '../_verture/tslib.es6-
|
|
13
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
14
14
|
import '../Help/index.js';
|
|
15
15
|
import '../Tooltip/index.js';
|
|
16
16
|
import 'rc-tooltip';
|
package/Selector/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __awaiter, _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useRef, useEffect, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-75fa4188.js';
|
package/SelectorPicker/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
|
14
14
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
|
|
15
15
|
import { Tooltip } from '../Tooltip/index.js';
|
|
16
16
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
17
|
-
import '../_verture/tslib.es6-
|
|
17
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
18
18
|
import '../Help/index.js';
|
|
19
19
|
import '@para-ui/icons/Help';
|
|
20
20
|
import 'rc-tooltip';
|
package/SingleBox/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
|
9
9
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
|
|
10
10
|
import { Tooltip } from '../Tooltip/index.js';
|
|
11
11
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
12
|
-
import '../_verture/tslib.es6-
|
|
12
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
13
13
|
import '@paraview/lib';
|
|
14
14
|
import '@para-ui/icons/PreviewClose';
|
|
15
15
|
import '@para-ui/icons/PreviewOpen';
|
package/Slider/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import RcSlider, { Range, SliderTooltip, Handle } from 'rc-slider';
|
package/Stepper/index.js
CHANGED
package/Switch/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import LoadingOutlined from '@para-ui/icons/LoadingF';
|
|
4
4
|
import RcSwitch from 'rc-switch';
|
package/Table/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as __rest, a as __awaiter } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useEffect, useMemo, useCallback, Fragment as Fragment$1 } from 'react';
|
|
4
4
|
import { Get, Post, DeepClone, GetBrowserClass, Cancel, ArrayToObject } from '@paraview/lib';
|
|
@@ -1696,7 +1696,8 @@ const TableHead = props => {
|
|
|
1696
1696
|
selectAll,
|
|
1697
1697
|
selectStatus,
|
|
1698
1698
|
checkNumber = 0,
|
|
1699
|
-
currentPageTotal = 0
|
|
1699
|
+
currentPageTotal = 0,
|
|
1700
|
+
resizePaginationLine
|
|
1700
1701
|
} = props;
|
|
1701
1702
|
const intl = useFormatMessage('Table', localeJson);
|
|
1702
1703
|
const [indeterminate, setIndeterminate] = useState(false); // 半选中
|
|
@@ -1781,7 +1782,8 @@ const TableHead = props => {
|
|
|
1781
1782
|
currentRowsPerPage: currentRowsPerPage,
|
|
1782
1783
|
changePage: changePageCom,
|
|
1783
1784
|
changeRowsPerPage: changeRowsPerPageCom,
|
|
1784
|
-
getPopupContainer: () => document.body
|
|
1785
|
+
getPopupContainer: () => document.body,
|
|
1786
|
+
resizeLine: resizePaginationLine
|
|
1785
1787
|
}), refreshInside && jsx(Button.IconButton, Object.assign({
|
|
1786
1788
|
className: 'refresh-btn',
|
|
1787
1789
|
variant: "outlined",
|
|
@@ -1922,7 +1924,8 @@ const Table = propsInit => {
|
|
|
1922
1924
|
onError,
|
|
1923
1925
|
refreshInside = props.url ? true : false,
|
|
1924
1926
|
checkCount = props.check ? true : false,
|
|
1925
|
-
onDragRow
|
|
1927
|
+
onDragRow,
|
|
1928
|
+
resizePaginationLine
|
|
1926
1929
|
} = props;
|
|
1927
1930
|
const intl = useFormatMessage('Table', localeJson);
|
|
1928
1931
|
const dayNum = props.expirationTime ? props.expirationTime === 0 ? 100000000 : props.expirationTime : 7; // 过期天数
|
|
@@ -3032,9 +3035,10 @@ const Table = propsInit => {
|
|
|
3032
3035
|
selectStatus: headSelectStatus,
|
|
3033
3036
|
selectAll: setAllCheck,
|
|
3034
3037
|
checkNumber: Object.keys(checkJson).length,
|
|
3035
|
-
currentPageTotal: rowData.length
|
|
3038
|
+
currentPageTotal: rowData.length,
|
|
3039
|
+
resizePaginationLine: resizePaginationLine
|
|
3036
3040
|
});
|
|
3037
|
-
}, [total, pageCom, sizeCom, sizeArrCom, pagination, loadMore, autoPagination, paginationType, flippingArrow, refreshInside, checkCount, headSelectStatus, rowData, checkJson, disabledJson, totalDataJson]);
|
|
3041
|
+
}, [total, pageCom, sizeCom, sizeArrCom, pagination, loadMore, autoPagination, paginationType, flippingArrow, refreshInside, checkCount, headSelectStatus, rowData, checkJson, disabledJson, totalDataJson, resizePaginationLine]);
|
|
3038
3042
|
// 表格内容滚动
|
|
3039
3043
|
const tableBoxScroll = e => {
|
|
3040
3044
|
const dom = tableRef.current;
|
package/Table/interface.d.ts
CHANGED
|
@@ -191,6 +191,8 @@ export interface TableProps extends TableHeadBodyPublicProps {
|
|
|
191
191
|
flippingArrow?: PaginationFlippingArrow[];
|
|
192
192
|
/** 自适应分页,根据外容器大小,改变分页模式 */
|
|
193
193
|
autoPagination?: boolean;
|
|
194
|
+
/** 重新计算分页换行不换行 */
|
|
195
|
+
resizePaginationLine?: string | number;
|
|
194
196
|
/** 渲染表格一行数据 (跟表格头部head里面的render参数互斥) */
|
|
195
197
|
tableCell?: (row: any, params: any) => ReactNode;
|
|
196
198
|
/** 请求回调参数 requestCallback(data, cb) cb(data) 需要回调数据回来 */
|
package/Tabs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import React__default, { useState, useEffect, createElement } from 'react';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import RcTabs, { TabPane } from 'rc-tabs';
|
package/Tag/TagGroup.d.ts
CHANGED
package/Tag/index.d.ts
CHANGED
|
@@ -43,6 +43,10 @@ export interface TagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
43
43
|
editInputWidth?: number;
|
|
44
44
|
/** 提示最大宽度 */
|
|
45
45
|
tipMaxWidth?: number | string;
|
|
46
|
+
/** 下边距 */
|
|
47
|
+
marginBottom?: string;
|
|
48
|
+
/** 右边距 */
|
|
49
|
+
marginRight?: string;
|
|
46
50
|
}
|
|
47
51
|
export type TagPropsWithChild = PropsWithChildren<TagProps>;
|
|
48
52
|
export type { TagGroupProps };
|