@ccs-ui/rc-pro 2.3.6-beta-2 → 2.3.6-beta-3
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/es/pro-table/head.d.ts +4 -1
- package/es/pro-table/head.js +3 -1
- package/es/pro-table/table.js +4 -0
- package/es/table/index.less +1 -0
- package/package.json +1 -1
package/es/pro-table/head.d.ts
CHANGED
|
@@ -8,8 +8,11 @@ type PropsType<T> = Pick<CcsProTableProps<T>, 'toolbar' | 'formItems' | 'formIni
|
|
|
8
8
|
form: FormInstance<any>;
|
|
9
9
|
/** table 操作栏 */
|
|
10
10
|
tableOperation: ReactElement;
|
|
11
|
+
/** 查询 */
|
|
11
12
|
onSearch: () => void;
|
|
13
|
+
/** header 高度改变 */
|
|
14
|
+
onHeaderResize: () => void;
|
|
12
15
|
};
|
|
13
16
|
/** 操作按钮、查询,重置、列筛选、 */
|
|
14
|
-
declare function HeadComponent<T>({ form, title, toolbar, children, expandForm, formItems, formInitValues, formItemLabelWidth, tableOperation, onSearch, }: PropsType<T>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function HeadComponent<T>({ form, title, toolbar, children, expandForm, formItems, formInitValues, formItemLabelWidth, tableOperation, onSearch, onHeaderResize, }: PropsType<T>): import("react/jsx-runtime").JSX.Element;
|
|
15
18
|
export default HeadComponent;
|
package/es/pro-table/head.js
CHANGED
|
@@ -28,7 +28,8 @@ function HeadComponent(_ref) {
|
|
|
28
28
|
formInitValues = _ref.formInitValues,
|
|
29
29
|
formItemLabelWidth = _ref.formItemLabelWidth,
|
|
30
30
|
tableOperation = _ref.tableOperation,
|
|
31
|
-
onSearch = _ref.onSearch
|
|
31
|
+
onSearch = _ref.onSearch,
|
|
32
|
+
onHeaderResize = _ref.onHeaderResize;
|
|
32
33
|
var formItemsRef = useRef(null);
|
|
33
34
|
// 查询条件是否展开
|
|
34
35
|
var _useState = useState(expandForm),
|
|
@@ -61,6 +62,7 @@ function HeadComponent(_ref) {
|
|
|
61
62
|
// 尺寸变化重设尺寸
|
|
62
63
|
var resizeFn = _debounce(function (hm) {
|
|
63
64
|
setVisible(hm);
|
|
65
|
+
onHeaderResize();
|
|
64
66
|
}, 500);
|
|
65
67
|
|
|
66
68
|
// 监听dom尺寸变化
|
package/es/pro-table/table.js
CHANGED
|
@@ -596,6 +596,10 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
596
596
|
formInitValues: formInitValues,
|
|
597
597
|
formItemLabelWidth: props.formItemLabelWidth,
|
|
598
598
|
onSearch: _onSearch,
|
|
599
|
+
onHeaderResize: function onHeaderResize() {
|
|
600
|
+
var _tableRef$current2;
|
|
601
|
+
return (_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : _tableRef$current2.onFixedThead();
|
|
602
|
+
},
|
|
599
603
|
title: props.title,
|
|
600
604
|
tableOperation: (table === null || table === void 0 ? void 0 : table.hideOperation) !== true ? /*#__PURE__*/_jsx(TableOperation, {
|
|
601
605
|
onChangeRowSize: function onChangeRowSize(e) {
|
package/es/table/index.less
CHANGED