@hw-component/table 0.0.5-beta-v3 → 0.0.5-beta-v6
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/HTableBody/index.d.ts +4 -2
- package/es/HTableBody/index.js +4 -2
- package/es/modal.d.ts +2 -0
- package/lib/HTableBody/index.d.ts +4 -2
- package/lib/HTableBody/index.js +4 -2
- package/lib/modal.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/HTableBody/index.tsx +5 -1
- package/src/components/modal.ts +2 -0
package/es/HTableBody/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { ActionRenderFn, ConfigDataModal, ParamsModal } from "../modal";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import type { HTableInstance } from "../modal";
|
|
5
5
|
import type { HRowSelection } from "../modal";
|
|
6
|
+
import { AffixProps } from "antd/lib/affix";
|
|
6
7
|
interface HTableBodyProps extends Omit<ProTableProps<any, any>, "dataSource" | "rowSelection"> {
|
|
7
8
|
configData?: ConfigDataModal;
|
|
8
9
|
onPageChange?: (params: ParamsModal) => void;
|
|
@@ -11,7 +12,8 @@ interface HTableBodyProps extends Omit<ProTableProps<any, any>, "dataSource" | "
|
|
|
11
12
|
tableStyle?: React.CSSProperties;
|
|
12
13
|
paginationStyle?: React.CSSProperties;
|
|
13
14
|
actionRender?: ActionRenderFn;
|
|
14
|
-
rowSelection?: HRowSelection;
|
|
15
|
+
rowSelection?: HRowSelection | false;
|
|
16
|
+
affixProps?: AffixProps | false;
|
|
15
17
|
}
|
|
16
|
-
declare const _default: ({ configData, pagination, onPageChange, rowSelection, rowKey, emptyRender, errorRender, tableStyle, paginationStyle, headerTitle, options, actionRender, ...props }: HTableBodyProps) => JSX.Element;
|
|
18
|
+
declare const _default: ({ configData, pagination, onPageChange, rowSelection, rowKey, emptyRender, errorRender, tableStyle, paginationStyle, headerTitle, options, actionRender, affixProps, ...props }: HTableBodyProps) => JSX.Element;
|
|
17
19
|
export default _default;
|
package/es/HTableBody/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import HTablePagination from '../HTablePagination/index.js';
|
|
|
21
21
|
import { useClassName } from '../hooks/index.js';
|
|
22
22
|
import AlertMsg from './AlertMsg.js';
|
|
23
23
|
|
|
24
|
-
var _excluded = ["configData", "pagination", "onPageChange", "rowSelection", "rowKey", "emptyRender", "errorRender", "tableStyle", "paginationStyle", "headerTitle", "options", "actionRender"];
|
|
24
|
+
var _excluded = ["configData", "pagination", "onPageChange", "rowSelection", "rowKey", "emptyRender", "errorRender", "tableStyle", "paginationStyle", "headerTitle", "options", "actionRender", "affixProps"];
|
|
25
25
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
26
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
27
|
var defaultRender = function defaultRender() {
|
|
@@ -50,6 +50,7 @@ var Body = (function (_ref) {
|
|
|
50
50
|
headerTitle = _ref.headerTitle,
|
|
51
51
|
options = _ref.options,
|
|
52
52
|
actionRender = _ref.actionRender,
|
|
53
|
+
affixProps = _ref.affixProps,
|
|
53
54
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
54
55
|
var selectedRowKeys = rowSelection.selectedRowKeys;
|
|
55
56
|
var _useHTableContext = useHTableContext(),
|
|
@@ -131,7 +132,8 @@ var Body = (function (_ref) {
|
|
|
131
132
|
pagination: false
|
|
132
133
|
})), pagination !== false && jsx(HTablePagination, _objectSpread({
|
|
133
134
|
onPageChange: onPageChange,
|
|
134
|
-
paginationStyle: paginationStyle
|
|
135
|
+
paginationStyle: paginationStyle,
|
|
136
|
+
affixProps: affixProps
|
|
135
137
|
}, pagination))]
|
|
136
138
|
})
|
|
137
139
|
});
|
package/es/modal.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { ColProps } from "antd";
|
|
|
5
5
|
import type React from "react";
|
|
6
6
|
import type { ModalProps } from "antd";
|
|
7
7
|
import type { TableProps } from "antd/lib/table";
|
|
8
|
+
import { AffixProps } from "antd/lib/affix";
|
|
8
9
|
export interface RowObj {
|
|
9
10
|
keys?: React.Key[];
|
|
10
11
|
rowData?: any[];
|
|
@@ -59,6 +60,7 @@ export interface HTableProps extends Omit<ProTableProps<any, any>, "request" | "
|
|
|
59
60
|
rowKey?: string;
|
|
60
61
|
allPageCheck?: boolean;
|
|
61
62
|
rowSelection?: HRowSelection | false;
|
|
63
|
+
affixProps?: AffixProps | false;
|
|
62
64
|
}
|
|
63
65
|
export interface TableInstance {
|
|
64
66
|
reload: (params?: ParamsModal) => Promise<any>;
|
|
@@ -3,6 +3,7 @@ import type { ActionRenderFn, ConfigDataModal, ParamsModal } from "../modal";
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import type { HTableInstance } from "../modal";
|
|
5
5
|
import type { HRowSelection } from "../modal";
|
|
6
|
+
import { AffixProps } from "antd/lib/affix";
|
|
6
7
|
interface HTableBodyProps extends Omit<ProTableProps<any, any>, "dataSource" | "rowSelection"> {
|
|
7
8
|
configData?: ConfigDataModal;
|
|
8
9
|
onPageChange?: (params: ParamsModal) => void;
|
|
@@ -11,7 +12,8 @@ interface HTableBodyProps extends Omit<ProTableProps<any, any>, "dataSource" | "
|
|
|
11
12
|
tableStyle?: React.CSSProperties;
|
|
12
13
|
paginationStyle?: React.CSSProperties;
|
|
13
14
|
actionRender?: ActionRenderFn;
|
|
14
|
-
rowSelection?: HRowSelection;
|
|
15
|
+
rowSelection?: HRowSelection | false;
|
|
16
|
+
affixProps?: AffixProps | false;
|
|
15
17
|
}
|
|
16
|
-
declare const _default: ({ configData, pagination, onPageChange, rowSelection, rowKey, emptyRender, errorRender, tableStyle, paginationStyle, headerTitle, options, actionRender, ...props }: HTableBodyProps) => JSX.Element;
|
|
18
|
+
declare const _default: ({ configData, pagination, onPageChange, rowSelection, rowKey, emptyRender, errorRender, tableStyle, paginationStyle, headerTitle, options, actionRender, affixProps, ...props }: HTableBodyProps) => JSX.Element;
|
|
17
19
|
export default _default;
|
package/lib/HTableBody/index.js
CHANGED
|
@@ -24,7 +24,7 @@ var index$1 = require('../HTablePagination/index.js');
|
|
|
24
24
|
var index = require('../hooks/index.js');
|
|
25
25
|
var AlertMsg = require('./AlertMsg.js');
|
|
26
26
|
|
|
27
|
-
var _excluded = ["configData", "pagination", "onPageChange", "rowSelection", "rowKey", "emptyRender", "errorRender", "tableStyle", "paginationStyle", "headerTitle", "options", "actionRender"];
|
|
27
|
+
var _excluded = ["configData", "pagination", "onPageChange", "rowSelection", "rowKey", "emptyRender", "errorRender", "tableStyle", "paginationStyle", "headerTitle", "options", "actionRender", "affixProps"];
|
|
28
28
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
29
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
30
|
var defaultRender = function defaultRender() {
|
|
@@ -53,6 +53,7 @@ var Body = (function (_ref) {
|
|
|
53
53
|
headerTitle = _ref.headerTitle,
|
|
54
54
|
options = _ref.options,
|
|
55
55
|
actionRender = _ref.actionRender,
|
|
56
|
+
affixProps = _ref.affixProps,
|
|
56
57
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
57
58
|
var selectedRowKeys = rowSelection.selectedRowKeys;
|
|
58
59
|
var _useHTableContext = context.useHTableContext(),
|
|
@@ -134,7 +135,8 @@ var Body = (function (_ref) {
|
|
|
134
135
|
pagination: false
|
|
135
136
|
})), pagination !== false && jsxRuntime.jsx(index$1.default, _objectSpread({
|
|
136
137
|
onPageChange: onPageChange,
|
|
137
|
-
paginationStyle: paginationStyle
|
|
138
|
+
paginationStyle: paginationStyle,
|
|
139
|
+
affixProps: affixProps
|
|
138
140
|
}, pagination))]
|
|
139
141
|
})
|
|
140
142
|
});
|
package/lib/modal.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { ColProps } from "antd";
|
|
|
5
5
|
import type React from "react";
|
|
6
6
|
import type { ModalProps } from "antd";
|
|
7
7
|
import type { TableProps } from "antd/lib/table";
|
|
8
|
+
import { AffixProps } from "antd/lib/affix";
|
|
8
9
|
export interface RowObj {
|
|
9
10
|
keys?: React.Key[];
|
|
10
11
|
rowData?: any[];
|
|
@@ -59,6 +60,7 @@ export interface HTableProps extends Omit<ProTableProps<any, any>, "request" | "
|
|
|
59
60
|
rowKey?: string;
|
|
60
61
|
allPageCheck?: boolean;
|
|
61
62
|
rowSelection?: HRowSelection | false;
|
|
63
|
+
affixProps?: AffixProps | false;
|
|
62
64
|
}
|
|
63
65
|
export interface TableInstance {
|
|
64
66
|
reload: (params?: ParamsModal) => Promise<any>;
|
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ import HTablePagination from "../HTablePagination";
|
|
|
12
12
|
import { useClassName } from "../hooks";
|
|
13
13
|
import AlertMsg from "./AlertMsg";
|
|
14
14
|
import type { HRowSelection } from "../modal";
|
|
15
|
+
import {AffixProps} from "antd/lib/affix";
|
|
15
16
|
interface HTableBodyProps
|
|
16
17
|
extends Omit<ProTableProps<any, any>, "dataSource" | "rowSelection"> {
|
|
17
18
|
configData?: ConfigDataModal;
|
|
@@ -24,7 +25,8 @@ interface HTableBodyProps
|
|
|
24
25
|
tableStyle?: React.CSSProperties;
|
|
25
26
|
paginationStyle?: React.CSSProperties;
|
|
26
27
|
actionRender?: ActionRenderFn;
|
|
27
|
-
rowSelection?: HRowSelection;
|
|
28
|
+
rowSelection?: HRowSelection|false;
|
|
29
|
+
affixProps?: AffixProps | false;
|
|
28
30
|
}
|
|
29
31
|
const defaultRender = () => {
|
|
30
32
|
return <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />;
|
|
@@ -47,6 +49,7 @@ export default ({
|
|
|
47
49
|
headerTitle,
|
|
48
50
|
options,
|
|
49
51
|
actionRender,
|
|
52
|
+
affixProps,
|
|
50
53
|
...props
|
|
51
54
|
}: HTableBodyProps) => {
|
|
52
55
|
// @ts-ignore
|
|
@@ -131,6 +134,7 @@ export default ({
|
|
|
131
134
|
<HTablePagination
|
|
132
135
|
onPageChange={onPageChange}
|
|
133
136
|
paginationStyle={paginationStyle}
|
|
137
|
+
affixProps={affixProps}
|
|
134
138
|
{...pagination}
|
|
135
139
|
/>
|
|
136
140
|
)}
|
package/src/components/modal.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { ColProps } from "antd";
|
|
|
8
8
|
import type React from "react";
|
|
9
9
|
import type { ModalProps } from "antd";
|
|
10
10
|
import type { TableProps } from "antd/lib/table";
|
|
11
|
+
import {AffixProps} from "antd/lib/affix";
|
|
11
12
|
|
|
12
13
|
export interface RowObj {
|
|
13
14
|
keys?: React.Key[];
|
|
@@ -90,6 +91,7 @@ export interface HTableProps
|
|
|
90
91
|
rowKey?: string;
|
|
91
92
|
allPageCheck?: boolean;
|
|
92
93
|
rowSelection?: HRowSelection | false;
|
|
94
|
+
affixProps?: AffixProps | false;
|
|
93
95
|
}
|
|
94
96
|
export interface TableInstance {
|
|
95
97
|
reload: (params?: ParamsModal) => Promise<any>;
|