@para-ui/core 3.0.49 → 3.0.50
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/Form/index.js +1 -1
- package/FormItem/index.js +1 -1
- package/README.md +5 -0
- package/Table/index.js +31 -18
- package/Table/interface.d.ts +4 -0
- package/TextEditor/index.js +2 -3
- package/index.js +1 -1
- package/package.json +1 -1
- package/umd/ComboSelect.js +1 -1
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Form.js +1 -1
- package/umd/FormItem.js +4 -4
- package/umd/Table.js +4 -4
- package/umd/TextEditor.js +1 -1
- /package/_verture/{index-535eb442.js → index-b30abb46.js} +0 -0
package/Form/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-708dbb18.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-
|
|
6
|
+
import { F as FormItem, v as validate } from '../_verture/index-b30abb46.js';
|
|
7
7
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
8
8
|
import '../TextField/index.js';
|
|
9
9
|
import '../_verture/typeof-498dd2b1.js';
|
package/FormItem/index.js
CHANGED
package/README.md
CHANGED
package/Table/index.js
CHANGED
|
@@ -381,7 +381,8 @@ var TableHead$1 = function TableHead(props) {
|
|
|
381
381
|
dragColumn = props.dragColumn,
|
|
382
382
|
changeColumnWidth = props.changeColumnWidth,
|
|
383
383
|
headDataConfig = props.headDataConfig,
|
|
384
|
-
getPopupContainer = props.getPopupContainer
|
|
384
|
+
getPopupContainer = props.getPopupContainer,
|
|
385
|
+
tipMaxWidth = props.tipMaxWidth;
|
|
385
386
|
var _useState = useState(false),
|
|
386
387
|
_useState2 = _slicedToArray(_useState, 2),
|
|
387
388
|
indeterminate = _useState2[0],
|
|
@@ -705,9 +706,11 @@ var TableHead$1 = function TableHead(props) {
|
|
|
705
706
|
children: [jsx(Checkbox, {
|
|
706
707
|
checked: checked
|
|
707
708
|
}), jsx("span", {
|
|
708
|
-
children: jsx(AutoTips, {
|
|
709
|
+
children: jsx(AutoTips, Object.assign({
|
|
710
|
+
tipMaxWidth: tipMaxWidth
|
|
711
|
+
}, {
|
|
709
712
|
children: item.displayName
|
|
710
|
-
})
|
|
713
|
+
}))
|
|
711
714
|
})]
|
|
712
715
|
}), index);
|
|
713
716
|
});
|
|
@@ -824,7 +827,8 @@ var TableHead$1 = function TableHead(props) {
|
|
|
824
827
|
className: "table-header-title-label"
|
|
825
828
|
}, {
|
|
826
829
|
children: jsx(AutoTips, Object.assign({
|
|
827
|
-
beyondText: headCell.beyondText === undefined ? beyondText : headCell.beyondText
|
|
830
|
+
beyondText: headCell.beyondText === undefined ? beyondText : headCell.beyondText,
|
|
831
|
+
tipMaxWidth: headCell.tipMaxWidth !== undefined ? headCell.tipMaxWidth : tipMaxWidth
|
|
828
832
|
}, {
|
|
829
833
|
children: headCell.label
|
|
830
834
|
}))
|
|
@@ -853,7 +857,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
853
857
|
}))
|
|
854
858
|
}), headCell.name || index);
|
|
855
859
|
});
|
|
856
|
-
}, [headData, sortTable, filter, orderFieldArr, orderTypeArr, align, filterHead, selectFilterCom, beyondText, selectFilter, fixedColumn, lineWidth, dragColumn, changeColumnWidth, headDataConfig, getPopupContainer]);
|
|
860
|
+
}, [headData, sortTable, filter, orderFieldArr, orderTypeArr, align, filterHead, selectFilterCom, beyondText, selectFilter, fixedColumn, lineWidth, dragColumn, changeColumnWidth, headDataConfig, getPopupContainer, tipMaxWidth]);
|
|
857
861
|
// 操作栏memo
|
|
858
862
|
var TableOperateMemo = useMemo(function () {
|
|
859
863
|
if (operate) {
|
|
@@ -894,7 +898,8 @@ var TableHead$1 = function TableHead(props) {
|
|
|
894
898
|
className: "table-header-title-label"
|
|
895
899
|
}, {
|
|
896
900
|
children: jsx(AutoTips, Object.assign({
|
|
897
|
-
beyondText: operate.beyondText === undefined ? beyondText : operate.beyondText
|
|
901
|
+
beyondText: operate.beyondText === undefined ? beyondText : operate.beyondText,
|
|
902
|
+
tipMaxWidth: tipMaxWidth
|
|
898
903
|
}, {
|
|
899
904
|
children: operate.label
|
|
900
905
|
}))
|
|
@@ -903,7 +908,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
903
908
|
}))
|
|
904
909
|
}));
|
|
905
910
|
}
|
|
906
|
-
}, [operate, align, posFixed, showColumns, posFixed, beyondText, fixedColumn]);
|
|
911
|
+
}, [operate, align, posFixed, showColumns, posFixed, beyondText, fixedColumn, tipMaxWidth]);
|
|
907
912
|
// 显示列弹窗内容
|
|
908
913
|
var showListContent = function showListContent() {
|
|
909
914
|
return jsxs("div", Object.assign({
|
|
@@ -921,9 +926,11 @@ var TableHead$1 = function TableHead(props) {
|
|
|
921
926
|
children: [jsx(Checkbox, {
|
|
922
927
|
checked: checked
|
|
923
928
|
}), jsx("span", {
|
|
924
|
-
children: jsx(AutoTips, {
|
|
929
|
+
children: jsx(AutoTips, Object.assign({
|
|
930
|
+
tipMaxWidth: tipMaxWidth
|
|
931
|
+
}, {
|
|
925
932
|
children: item.label
|
|
926
|
-
})
|
|
933
|
+
}))
|
|
927
934
|
})]
|
|
928
935
|
}), index);
|
|
929
936
|
})
|
|
@@ -974,7 +981,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
974
981
|
}))
|
|
975
982
|
}))
|
|
976
983
|
}));
|
|
977
|
-
}, [showColumns, posFixed, operate, anchorElColums, showList, headDataJson, getPopupContainer]);
|
|
984
|
+
}, [showColumns, posFixed, operate, anchorElColums, showList, headDataJson, getPopupContainer, tipMaxWidth]);
|
|
978
985
|
// 处理class
|
|
979
986
|
var handClass = function handClass() {
|
|
980
987
|
var str = 'table-head';
|
|
@@ -1089,7 +1096,8 @@ var TableBody = function TableBody(props) {
|
|
|
1089
1096
|
posFixed = props.posFixed,
|
|
1090
1097
|
beyondText = props.beyondText,
|
|
1091
1098
|
onClickRow = props.onClickRow,
|
|
1092
|
-
rowClassMapping = props.rowClassMapping
|
|
1099
|
+
rowClassMapping = props.rowClassMapping,
|
|
1100
|
+
tipMaxWidth = props.tipMaxWidth;
|
|
1093
1101
|
var _useState = useState(0),
|
|
1094
1102
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1095
1103
|
expandableColSpan = _useState2[0],
|
|
@@ -1437,13 +1445,14 @@ var TableBody = function TableBody(props) {
|
|
|
1437
1445
|
style: handStyle(item)
|
|
1438
1446
|
}, {
|
|
1439
1447
|
children: item.autoTips === undefined || item.autoTips === true ? jsx(AutoTips, Object.assign({
|
|
1440
|
-
beyondText: item.beyondText === undefined ? beyondText : item.beyondText
|
|
1448
|
+
beyondText: item.beyondText === undefined ? beyondText : item.beyondText,
|
|
1449
|
+
tipMaxWidth: item.tipMaxWidth !== undefined ? item.tipMaxWidth : tipMaxWidth
|
|
1441
1450
|
}, {
|
|
1442
1451
|
children: text
|
|
1443
1452
|
})) : text
|
|
1444
1453
|
}), item.name || index);
|
|
1445
1454
|
});
|
|
1446
|
-
}, [tableCell, headData, align, formatter, orderFieldArr, orderTypeArr, sortTable, showColumns, operate, beyondText, fixedColumn]);
|
|
1455
|
+
}, [tableCell, headData, align, formatter, orderFieldArr, orderTypeArr, sortTable, showColumns, operate, beyondText, fixedColumn, tipMaxWidth]);
|
|
1447
1456
|
// 操作栏useCallback
|
|
1448
1457
|
var TableOperateUseCallback = useCallback(function (row, rowIndex) {
|
|
1449
1458
|
if (operate) {
|
|
@@ -1541,13 +1550,13 @@ var TableBody = function TableBody(props) {
|
|
|
1541
1550
|
}, index);
|
|
1542
1551
|
})
|
|
1543
1552
|
});
|
|
1544
|
-
}, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, disabledExpandJson, onExpand, disabledArrStatus, showColumns, onClickRow, rowClassMapping]);
|
|
1553
|
+
}, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, disabledExpandJson, onExpand, disabledArrStatus, showColumns, onClickRow, rowClassMapping, tipMaxWidth]);
|
|
1545
1554
|
// 内容memo
|
|
1546
1555
|
var TableBodyContentMemo = useMemo(function () {
|
|
1547
1556
|
return jsxs(Fragment$1, {
|
|
1548
1557
|
children: [TableBodySubjectContentMemo, MoreMemo]
|
|
1549
1558
|
});
|
|
1550
|
-
}, [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]);
|
|
1559
|
+
}, [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, tipMaxWidth]);
|
|
1551
1560
|
// 处理内容
|
|
1552
1561
|
var handContent = function handContent() {
|
|
1553
1562
|
// 无数据,且不再请求,显示暂无数据
|
|
@@ -1735,6 +1744,8 @@ var Table = function Table(propsInit) {
|
|
|
1735
1744
|
onClickColumns = props.onClickColumns,
|
|
1736
1745
|
_props$beyondText = props.beyondText,
|
|
1737
1746
|
beyondText = _props$beyondText === void 0 ? true : _props$beyondText,
|
|
1747
|
+
_props$tipMaxWidth = props.tipMaxWidth,
|
|
1748
|
+
tipMaxWidth = _props$tipMaxWidth === void 0 ? 500 : _props$tipMaxWidth,
|
|
1738
1749
|
loading = props.loading,
|
|
1739
1750
|
defaultSortValue = props.defaultSortValue,
|
|
1740
1751
|
defaultFilterValue = props.defaultFilterValue,
|
|
@@ -2849,10 +2860,11 @@ var Table = function Table(propsInit) {
|
|
|
2849
2860
|
lineWidth: lineWidth,
|
|
2850
2861
|
dragColumn: dragColumn,
|
|
2851
2862
|
headDataConfig: headDataConfig,
|
|
2863
|
+
tipMaxWidth: tipMaxWidth,
|
|
2852
2864
|
changeColumnWidth: changeColumnWidth,
|
|
2853
2865
|
getPopupContainer: getPopupContainer
|
|
2854
2866
|
});
|
|
2855
|
-
}, [totalDataJson, showColumns, rowKey, rowData, checkJson, disabledJson, orderTypeArr, orderFieldArr, sortTable, filter, expandable, check, headSelectStatus, radio, align, showHeadList, headDataCom, selectFilterCom, operate, onClickColumns, sortTableRadio, fixedTable, posFixed, beyondText, fixedColumn, lineWidth, dragColumn, headDataConfig, getPopupContainer, onSort]);
|
|
2867
|
+
}, [totalDataJson, showColumns, rowKey, rowData, checkJson, disabledJson, orderTypeArr, orderFieldArr, sortTable, filter, expandable, check, headSelectStatus, radio, align, showHeadList, headDataCom, selectFilterCom, operate, onClickColumns, sortTableRadio, fixedTable, posFixed, beyondText, fixedColumn, lineWidth, dragColumn, headDataConfig, getPopupContainer, onSort, tipMaxWidth]);
|
|
2856
2868
|
// 表格内容memo
|
|
2857
2869
|
var TableBodyMemo = useMemo(function () {
|
|
2858
2870
|
return jsx(TableBody, {
|
|
@@ -2900,9 +2912,10 @@ var Table = function Table(propsInit) {
|
|
|
2900
2912
|
fixedColumn: fixedColumn,
|
|
2901
2913
|
fixedTable: fixedTable,
|
|
2902
2914
|
onClickRow: onClickRow,
|
|
2903
|
-
rowClassMapping: rowClassMapping
|
|
2915
|
+
rowClassMapping: rowClassMapping,
|
|
2916
|
+
tipMaxWidth: tipMaxWidth
|
|
2904
2917
|
});
|
|
2905
|
-
}, [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]);
|
|
2918
|
+
}, [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, tipMaxWidth]);
|
|
2906
2919
|
// 表格分页memo
|
|
2907
2920
|
var TablePaginationMemo = useMemo(function () {
|
|
2908
2921
|
if (constData.current.page === null || constData.current.size === null || loadMore) return;
|
package/Table/interface.d.ts
CHANGED
|
@@ -79,6 +79,8 @@ export interface HeadDataProps {
|
|
|
79
79
|
beyondText?: boolean;
|
|
80
80
|
/** 超出不显示... */
|
|
81
81
|
autoTips?: boolean;
|
|
82
|
+
/** 提示最大宽度 */
|
|
83
|
+
tipMaxWidth?: number | string;
|
|
82
84
|
/** 排序,请求才有 */
|
|
83
85
|
orderNum?: number;
|
|
84
86
|
[name: string]: any;
|
|
@@ -138,6 +140,8 @@ export interface TableHeadBodyPublicProps {
|
|
|
138
140
|
posFixed?: PosFixedProps;
|
|
139
141
|
/** 超出内容显示文字还是dom */
|
|
140
142
|
beyondText?: boolean;
|
|
143
|
+
/** 提示最大宽度 */
|
|
144
|
+
tipMaxWidth?: number | string;
|
|
141
145
|
}
|
|
142
146
|
/** 表格参数 */
|
|
143
147
|
export interface TableProps extends TableHeadBodyPublicProps {
|
package/TextEditor/index.js
CHANGED
|
@@ -163,14 +163,13 @@ var TextEditor = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
163
163
|
})
|
|
164
164
|
}
|
|
165
165
|
};
|
|
166
|
-
//
|
|
166
|
+
// 国际化
|
|
167
167
|
useEffect(function () {
|
|
168
168
|
if (in18) {
|
|
169
|
-
console.log(in18);
|
|
170
169
|
i18nChangeLanguage(in18);
|
|
171
170
|
}
|
|
172
171
|
setToolBarKey(Math.random().toString(36).slice(-8));
|
|
173
|
-
}, [
|
|
172
|
+
}, [in18]);
|
|
174
173
|
// 非受控组件赋值
|
|
175
174
|
useEffect(function () {
|
|
176
175
|
if (defaultValue !== undefined) {
|
package/index.js
CHANGED
|
@@ -22,7 +22,7 @@ export { D as Dropdown } from './_verture/index-77f9e0fb.js';
|
|
|
22
22
|
export { default as DynamicMultiBox } from './DynamicMultiBox/index.js';
|
|
23
23
|
export { default as Empty } from './Empty/index.js';
|
|
24
24
|
export { default as Form } from './Form/index.js';
|
|
25
|
-
export { F as FormItem } from './_verture/index-
|
|
25
|
+
export { F as FormItem } from './_verture/index-b30abb46.js';
|
|
26
26
|
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-f70ba993.js';
|
|
27
27
|
export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
|
|
28
28
|
export { default as Help } from './Help/index.js';
|