@hw-component/table 1.9.93 → 1.9.95
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/.eslintcache +1 -1
- package/es/DialogTable/Content.d.ts +4 -3
- package/es/DialogTable/Content.js +52 -3
- package/es/DialogTable/DwEditTable.d.ts +5 -0
- package/es/DialogTable/DwEditTable.js +134 -0
- package/es/DialogTable/DwTable.js +2 -2
- package/es/DialogTable/ModalEditTable.d.ts +5 -0
- package/es/DialogTable/ModalEditTable.js +120 -0
- package/es/DialogTable/ModalTable.js +2 -2
- package/es/DialogTable/hooks.d.ts +4 -15
- package/es/DialogTable/hooks.js +9 -2
- package/es/EditTable/hooks.d.ts +9 -0
- package/es/EditTable/hooks.js +76 -0
- package/es/EditTable/index.d.ts +4 -0
- package/es/EditTable/index.js +181 -0
- package/es/EditTable/modal.d.ts +19 -0
- package/es/HTableBody/defaultRender.d.ts +7 -1
- package/es/HTableBody/defaultRender.js +11 -4
- package/es/HTableBody/index.js +4 -1
- package/es/HTableBody/modal.d.ts +3 -3
- package/es/HTablePagination/index.d.ts +2 -1
- package/es/HTablePagination/index.js +6 -4
- package/es/TableConfig.d.ts +5 -5
- package/es/index.d.ts +3 -0
- package/es/index.js +3 -0
- package/es/modal.d.ts +18 -7
- package/es/render/Text.d.ts +0 -1
- package/lib/DialogTable/Content.d.ts +4 -3
- package/lib/DialogTable/Content.js +53 -5
- package/lib/DialogTable/DwEditTable.d.ts +5 -0
- package/lib/DialogTable/DwEditTable.js +137 -0
- package/lib/DialogTable/DwTable.js +1 -1
- package/lib/DialogTable/ModalEditTable.d.ts +5 -0
- package/lib/DialogTable/ModalEditTable.js +123 -0
- package/lib/DialogTable/ModalTable.js +1 -1
- package/lib/DialogTable/hooks.d.ts +4 -15
- package/lib/DialogTable/hooks.js +9 -2
- package/lib/EditTable/hooks.d.ts +9 -0
- package/lib/EditTable/hooks.js +78 -0
- package/lib/EditTable/index.d.ts +4 -0
- package/lib/EditTable/index.js +184 -0
- package/lib/EditTable/modal.d.ts +19 -0
- package/lib/HTableBody/defaultRender.d.ts +7 -1
- package/lib/HTableBody/defaultRender.js +11 -4
- package/lib/HTableBody/index.js +4 -1
- package/lib/HTableBody/modal.d.ts +3 -3
- package/lib/HTablePagination/index.d.ts +2 -1
- package/lib/HTablePagination/index.js +6 -4
- package/lib/TableConfig.d.ts +5 -5
- package/lib/index.d.ts +3 -0
- package/lib/index.js +6 -0
- package/lib/modal.d.ts +18 -7
- package/lib/render/Text.d.ts +0 -1
- package/package.json +4 -3
- package/src/components/DialogTable/Content.tsx +25 -2
- package/src/components/DialogTable/DwEditTable.tsx +111 -0
- package/src/components/DialogTable/DwTable.tsx +3 -2
- package/src/components/DialogTable/ModalEditTable.tsx +99 -0
- package/src/components/DialogTable/ModalTable.tsx +3 -2
- package/src/components/DialogTable/hooks.ts +15 -4
- package/src/components/EditTable/hooks.ts +43 -0
- package/src/components/EditTable/index.tsx +118 -0
- package/src/components/EditTable/modal.ts +26 -0
- package/src/components/HTableBody/defaultRender.tsx +17 -7
- package/src/components/HTableBody/index.tsx +1 -1
- package/src/components/HTableBody/modal.ts +6 -7
- package/src/components/HTablePagination/index.tsx +7 -3
- package/src/components/Table.tsx +1 -0
- package/src/components/TableConfig.tsx +7 -3
- package/src/components/index.tsx +3 -0
- package/src/components/modal.ts +24 -10
- package/src/components/render/index.tsx +1 -0
- package/src/pages/DwTable/index.tsx +1 -0
- package/src/pages/EditTable/index.tsx +70 -0
- package/src/pages/ModalEditTable/index.tsx +84 -0
- package/src/pages/Table/index.tsx +14 -15
- package/src/routes.tsx +12 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { HTableInstance } from "../modal";
|
|
3
3
|
export declare const emptyDefaultRender: () => JSX.Element;
|
|
4
|
-
|
|
4
|
+
interface errorDefaultRenderParams {
|
|
5
|
+
reload?: () => void;
|
|
6
|
+
error: Error;
|
|
7
|
+
tableInstance?: HTableInstance;
|
|
8
|
+
}
|
|
9
|
+
export declare const errorDefaultRender: ({ error, tableInstance, reload, }: errorDefaultRenderParams) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -29,7 +29,16 @@ var emptyDefaultRender = function emptyDefaultRender() {
|
|
|
29
29
|
description: "\u6682\u65E0\u6570\u636E~"
|
|
30
30
|
}, pubProps));
|
|
31
31
|
};
|
|
32
|
-
var errorDefaultRender = function errorDefaultRender(
|
|
32
|
+
var errorDefaultRender = function errorDefaultRender(_ref) {
|
|
33
|
+
var error = _ref.error,
|
|
34
|
+
tableInstance = _ref.tableInstance,
|
|
35
|
+
reload = _ref.reload;
|
|
36
|
+
var pageReload = function pageReload() {
|
|
37
|
+
if (tableInstance) {
|
|
38
|
+
return tableInstance.table.reloadWithParams();
|
|
39
|
+
}
|
|
40
|
+
return reload === null || reload === void 0 ? void 0 : reload();
|
|
41
|
+
};
|
|
33
42
|
return jsx(Empty, _objectSpread(_objectSpread({
|
|
34
43
|
image: img,
|
|
35
44
|
description: error.message
|
|
@@ -40,9 +49,7 @@ var errorDefaultRender = function errorDefaultRender(tableInstance, error) {
|
|
|
40
49
|
style: {
|
|
41
50
|
borderRadius: 16
|
|
42
51
|
},
|
|
43
|
-
onClick:
|
|
44
|
-
tableInstance.table.reloadWithParams();
|
|
45
|
-
},
|
|
52
|
+
onClick: pageReload,
|
|
46
53
|
children: "\u5237\u65B0"
|
|
47
54
|
})
|
|
48
55
|
}));
|
package/es/HTableBody/index.js
CHANGED
|
@@ -155,7 +155,10 @@ var Body = (function (bodyProps) {
|
|
|
155
155
|
}), jsxs(ConfigProvider, {
|
|
156
156
|
renderEmpty: function renderEmpty() {
|
|
157
157
|
if (error) {
|
|
158
|
-
return tableErrorRender === null || tableErrorRender === void 0 ? void 0 : tableErrorRender(
|
|
158
|
+
return tableErrorRender === null || tableErrorRender === void 0 ? void 0 : tableErrorRender({
|
|
159
|
+
tableInstance: tableInstance,
|
|
160
|
+
error: error
|
|
161
|
+
});
|
|
159
162
|
}
|
|
160
163
|
return tableEmptyRender === null || tableEmptyRender === void 0 ? void 0 : tableEmptyRender(tableInstance);
|
|
161
164
|
},
|
package/es/HTableBody/modal.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { OptionConfig } from "@ant-design/pro-table/lib/components/ToolBar"
|
|
|
2
2
|
import type { Key } from "react";
|
|
3
3
|
import type React from "react";
|
|
4
4
|
import type { ProTableProps } from "@ant-design/pro-table";
|
|
5
|
-
import
|
|
5
|
+
import { ActionRenderFn, ConfigDataModal, EmptyPageRender, ErrorPageRender, HRowSelection, HTableInstance, ParamsModal } from "../modal";
|
|
6
6
|
import type { AffixProps } from "antd/lib/affix";
|
|
7
7
|
import type { IPaginationProps } from "@/components/HTablePagination";
|
|
8
8
|
export interface OptionModal extends OptionConfig {
|
|
@@ -11,8 +11,8 @@ export interface OptionModal extends OptionConfig {
|
|
|
11
11
|
export interface HTableBodyProps extends Omit<ProTableProps<any, any>, "dataSource" | "rowSelection" | "options" | "pagination"> {
|
|
12
12
|
configData?: ConfigDataModal;
|
|
13
13
|
onPageChange?: (params: ParamsModal) => void;
|
|
14
|
-
emptyRender?:
|
|
15
|
-
errorRender?:
|
|
14
|
+
emptyRender?: EmptyPageRender;
|
|
15
|
+
errorRender?: ErrorPageRender;
|
|
16
16
|
tableStyle?: React.CSSProperties;
|
|
17
17
|
paginationStyle?: React.CSSProperties;
|
|
18
18
|
actionRender?: ActionRenderFn;
|
|
@@ -10,6 +10,7 @@ export interface IPaginationProps extends Omit<PaginationProps, "showTotal"> {
|
|
|
10
10
|
actionRender?: (tableInstance: HTableInstance) => React.ReactNode;
|
|
11
11
|
table?: HTableInstance;
|
|
12
12
|
showTotal?: false | PaginationProps["showTotal"];
|
|
13
|
+
data?: Record<string, any>;
|
|
13
14
|
}
|
|
14
|
-
declare const _default: ({ onPageChange, paginationStyle, affixProps, goTop, actionRender, table, showTotal, ...props }: IPaginationProps) => JSX.Element;
|
|
15
|
+
declare const _default: ({ onPageChange, paginationStyle, affixProps, goTop, actionRender, table, showTotal, data, ...props }: IPaginationProps) => JSX.Element;
|
|
15
16
|
export default _default;
|
|
@@ -20,7 +20,7 @@ import { useState } from 'react';
|
|
|
20
20
|
import GoTop from '../GoTop/index.js';
|
|
21
21
|
import { useHTableConfigContext } from '../TableConfig.js';
|
|
22
22
|
|
|
23
|
-
var _excluded = ["onPageChange", "paginationStyle", "affixProps", "goTop", "actionRender", "table", "showTotal"],
|
|
23
|
+
var _excluded = ["onPageChange", "paginationStyle", "affixProps", "goTop", "actionRender", "table", "showTotal", "data"],
|
|
24
24
|
_excluded2 = ["offsetBottom"];
|
|
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 _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -40,18 +40,20 @@ var HTablePagination = (function (_ref3) {
|
|
|
40
40
|
table = _ref3.table,
|
|
41
41
|
_ref3$showTotal = _ref3.showTotal,
|
|
42
42
|
showTotal = _ref3$showTotal === void 0 ? defaultShowTotal : _ref3$showTotal,
|
|
43
|
+
data = _ref3.data,
|
|
43
44
|
props = _objectWithoutProperties(_ref3, _excluded);
|
|
44
45
|
var _useHTableContext = useHTableContext(),
|
|
45
46
|
contextOnPageChange = _useHTableContext.onPageChange,
|
|
46
|
-
|
|
47
|
+
contextData = _useHTableContext.data,
|
|
47
48
|
contextTableInstance = _useHTableContext.tableInstance;
|
|
48
49
|
var _useHTableConfigConte = useHTableConfigContext({
|
|
49
50
|
paginationStyle: paginationStyle
|
|
50
51
|
}),
|
|
51
52
|
defaultPaginationStyle = _useHTableConfigConte.paginationStyle;
|
|
53
|
+
var cuData = data || contextData;
|
|
52
54
|
var tableInstance = table || contextTableInstance;
|
|
53
55
|
var tableOnPageChange = onPageChange || contextOnPageChange;
|
|
54
|
-
var _ref4 =
|
|
56
|
+
var _ref4 = cuData || {},
|
|
55
57
|
size = _ref4.size,
|
|
56
58
|
current = _ref4.current,
|
|
57
59
|
total = _ref4.total;
|
|
@@ -64,7 +66,7 @@ var HTablePagination = (function (_ref3) {
|
|
|
64
66
|
style = _useState2[0],
|
|
65
67
|
setStyle = _useState2[1];
|
|
66
68
|
var cuShowTotal = showTotal === false ? undefined : showTotal;
|
|
67
|
-
if (!
|
|
69
|
+
if (!cuData) {
|
|
68
70
|
return jsx(Fragment, {});
|
|
69
71
|
}
|
|
70
72
|
if (affixProps === false) {
|
package/es/TableConfig.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
2
|
+
import { EmptyPageRender, ErrorPageRender, ValueTypeConfigModal } from "./modal";
|
|
3
3
|
interface HTableConfigContextModal {
|
|
4
|
-
emptyRender?:
|
|
5
|
-
errorRender?:
|
|
4
|
+
emptyRender?: EmptyPageRender;
|
|
5
|
+
errorRender?: ErrorPageRender;
|
|
6
6
|
headerStyle?: React.CSSProperties;
|
|
7
7
|
tableStyle?: React.CSSProperties;
|
|
8
8
|
paginationStyle?: React.CSSProperties;
|
|
@@ -11,8 +11,8 @@ interface HTableConfigContextModal {
|
|
|
11
11
|
}
|
|
12
12
|
export declare const HTableConfigContext: React.Context<HTableConfigContextModal | null>;
|
|
13
13
|
export declare const useHTableConfigContext: ({ emptyRender, errorRender, headerStyle, tableStyle, paginationStyle, }: HTableConfigContextModal) => {
|
|
14
|
-
errorRender:
|
|
15
|
-
emptyRender:
|
|
14
|
+
errorRender: ErrorPageRender | undefined;
|
|
15
|
+
emptyRender: EmptyPageRender | undefined;
|
|
16
16
|
headerStyle: React.CSSProperties | undefined;
|
|
17
17
|
tableStyle: React.CSSProperties | undefined;
|
|
18
18
|
paginationStyle: React.CSSProperties | undefined;
|
package/es/index.d.ts
CHANGED
|
@@ -12,3 +12,6 @@ export { default as HModalTable } from "./DialogTable/ModalTable";
|
|
|
12
12
|
export { useHDialogTable } from "./DialogTable/hooks";
|
|
13
13
|
export { default as HDwTable } from "./DialogTable/DwTable";
|
|
14
14
|
export { DefaultSubComponent as HTableHeaderSubBtn } from "./HTableHeader/defaultSubComponent";
|
|
15
|
+
export { default as EditTable } from "./EditTable";
|
|
16
|
+
export { default as HModalEditTable } from "./DialogTable/ModalEditTable";
|
|
17
|
+
export { default as HDwEditTable } from "./DialogTable/DwEditTable";
|
package/es/index.js
CHANGED
|
@@ -11,4 +11,7 @@ export { default as HModalTable } from './DialogTable/ModalTable.js';
|
|
|
11
11
|
export { useHDialogTable } from './DialogTable/hooks.js';
|
|
12
12
|
export { default as HDwTable } from './DialogTable/DwTable.js';
|
|
13
13
|
export { DefaultSubComponent as HTableHeaderSubBtn } from './HTableHeader/defaultSubComponent.js';
|
|
14
|
+
export { default as EditTable } from './EditTable/index.js';
|
|
15
|
+
export { default as HModalEditTable } from './DialogTable/ModalEditTable.js';
|
|
16
|
+
export { default as HDwEditTable } from './DialogTable/DwEditTable.js';
|
|
14
17
|
// powered by hdj
|
package/es/modal.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ import type { TableProps } from "antd/lib/table";
|
|
|
9
9
|
import type { AffixProps } from "antd/lib/affix";
|
|
10
10
|
import type { OptionModal } from "./HTableBody/modal";
|
|
11
11
|
import type { DrawerProps } from "antd";
|
|
12
|
-
import type { IPaginationProps } from "
|
|
12
|
+
import type { IPaginationProps } from "./HTablePagination";
|
|
13
|
+
import { EditTableProps } from "./EditTable/modal";
|
|
13
14
|
export interface RowObj {
|
|
14
15
|
keys?: React.Key[];
|
|
15
16
|
rowData?: any[];
|
|
@@ -56,8 +57,8 @@ export interface HTableProps extends Omit<ProTableProps<any, any>, "request" | "
|
|
|
56
57
|
searchSpan?: ColProps;
|
|
57
58
|
table?: HTableInstance;
|
|
58
59
|
actionRender?: ActionRenderFn;
|
|
59
|
-
emptyRender?:
|
|
60
|
-
errorRender?:
|
|
60
|
+
emptyRender?: EmptyPageRender;
|
|
61
|
+
errorRender?: ErrorPageRender;
|
|
61
62
|
hideHeader?: boolean;
|
|
62
63
|
action?: Record<string, actionFn>;
|
|
63
64
|
headerStyle?: React.CSSProperties;
|
|
@@ -120,24 +121,34 @@ export interface HDiaLogTableInstance {
|
|
|
120
121
|
hide: () => void;
|
|
121
122
|
params: any;
|
|
122
123
|
}
|
|
123
|
-
export interface DwTableProps extends DrawerProps {
|
|
124
|
+
export interface DwTableProps<T = HTableProps["configData"]> extends DrawerProps {
|
|
124
125
|
tableProps?: Omit<HTableProps, "configData" | "request">;
|
|
125
126
|
dialogTable?: HDiaLogTableInstance;
|
|
126
127
|
params?: Record<string, any>;
|
|
127
|
-
configData?:
|
|
128
|
+
configData?: T;
|
|
128
129
|
request?: HTableProps["request"];
|
|
129
130
|
contentRender?: (node: React.ReactNode) => React.ReactNode;
|
|
131
|
+
editTableProps?: Omit<EditTableProps, "configData" | "request">;
|
|
132
|
+
dataSource?: any[];
|
|
130
133
|
}
|
|
131
|
-
export interface ModalTableProps extends Omit<ModalProps, "onOk"> {
|
|
134
|
+
export interface ModalTableProps<T = HTableProps["configData"]> extends Omit<ModalProps, "onOk"> {
|
|
132
135
|
tableProps?: Omit<HTableProps, "configData" | "request">;
|
|
133
136
|
dialogTable?: HDiaLogTableInstance;
|
|
134
137
|
params?: Record<string, any>;
|
|
135
|
-
configData?:
|
|
138
|
+
configData?: T;
|
|
136
139
|
request?: HTableProps["request"];
|
|
137
140
|
contentRender?: (node: React.ReactNode) => React.ReactNode;
|
|
138
141
|
dataSource?: any[];
|
|
139
142
|
onOk?: (e?: React.MouseEvent<HTMLElement>) => void;
|
|
143
|
+
editTableProps?: Omit<EditTableProps, "configData" | "request">;
|
|
140
144
|
}
|
|
141
145
|
export type ValueTypeConfigRenderFn = (config: ConfigItemModal, itemData: any, index: number, tableInstance: HTableInstance) => React.ReactNode;
|
|
142
146
|
export type ValueTypeConfigModal = Record<string, ValueTypeConfigRenderFn>;
|
|
147
|
+
interface ErrorRenderParams {
|
|
148
|
+
error: Error;
|
|
149
|
+
tableInstance?: HTableInstance;
|
|
150
|
+
reload?: VoidFunction;
|
|
151
|
+
}
|
|
152
|
+
export type ErrorPageRender = (params: ErrorRenderParams) => React.ReactNode;
|
|
153
|
+
export type EmptyPageRender = (tableInstance?: HTableInstance) => React.ReactNode;
|
|
143
154
|
export {};
|
package/es/render/Text.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { ModalTableProps } from "
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import type { ModalTableProps } from "../modal";
|
|
3
|
+
import { ProColumns } from "@ant-design/pro-table/lib/typing";
|
|
4
|
+
export declare const TableContent: ({ tableProps, configData, dialogTable, request, contentRender, dataSource, }: ModalTableProps) => JSX.Element;
|
|
5
|
+
export declare const EditTableContent: ({ editTableProps, configData, request, contentRender, dataSource, }: ModalTableProps<ProColumns[]>) => JSX.Element;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
6
4
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
7
5
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -13,10 +11,41 @@ var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/obje
|
|
|
13
11
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
14
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
15
13
|
var Table = require('../Table.js');
|
|
14
|
+
require('@babel/runtime-corejs3/core-js-stable/promise');
|
|
15
|
+
require('react');
|
|
16
|
+
require('@hw-component/form');
|
|
17
|
+
require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
18
|
+
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
19
|
+
require('@babel/runtime-corejs3/helpers/asyncToGenerator');
|
|
20
|
+
require('@babel/runtime-corejs3/regenerator');
|
|
21
|
+
require('@babel/runtime-corejs3/core-js-stable/number/parse-int');
|
|
22
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/slice');
|
|
23
|
+
require('@babel/runtime-corejs3/core-js-stable/array/is-array');
|
|
24
|
+
require('ahooks');
|
|
25
|
+
require('@ant-design/pro-table');
|
|
26
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/find-index');
|
|
27
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/map');
|
|
28
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/keys');
|
|
29
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
30
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
31
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/splice');
|
|
32
|
+
require('antd/es/config-provider');
|
|
33
|
+
require('../render/config.js');
|
|
34
|
+
require('@babel/runtime-corejs3/helpers/toConsumableArray');
|
|
35
|
+
require('@babel/runtime-corejs3/helpers/typeof');
|
|
36
|
+
require('antd');
|
|
37
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/every');
|
|
38
|
+
require('../HTableBody/AlertMsg.js');
|
|
39
|
+
require('@ant-design/icons');
|
|
40
|
+
require('../HTableBody/Options/Title.js');
|
|
41
|
+
require('../HTableFooter/index.js');
|
|
42
|
+
require('../HTableHeader/Context.js');
|
|
43
|
+
require('../HTableHeader/RangePickerSearch.js');
|
|
44
|
+
var index = require('../EditTable/index.js');
|
|
16
45
|
|
|
17
46
|
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; }
|
|
18
47
|
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; }
|
|
19
|
-
var
|
|
48
|
+
var TableContent = function TableContent(_ref) {
|
|
20
49
|
var tableProps = _ref.tableProps,
|
|
21
50
|
configData = _ref.configData,
|
|
22
51
|
dialogTable = _ref.dialogTable,
|
|
@@ -33,7 +62,26 @@ var Content = (function (_ref) {
|
|
|
33
62
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
34
63
|
children: contentRender ? contentRender(node) : node
|
|
35
64
|
});
|
|
36
|
-
}
|
|
65
|
+
};
|
|
66
|
+
var EditTableContent = function EditTableContent(_ref2) {
|
|
67
|
+
var editTableProps = _ref2.editTableProps,
|
|
68
|
+
configData = _ref2.configData,
|
|
69
|
+
request = _ref2.request,
|
|
70
|
+
contentRender = _ref2.contentRender,
|
|
71
|
+
dataSource = _ref2.dataSource;
|
|
72
|
+
var node = jsxRuntime.jsx(index.default, _objectSpread(_objectSpread({}, editTableProps), {}, {
|
|
73
|
+
configData: configData || [],
|
|
74
|
+
request: request,
|
|
75
|
+
pagination: {
|
|
76
|
+
affixProps: false
|
|
77
|
+
},
|
|
78
|
+
dataSource: dataSource
|
|
79
|
+
}));
|
|
80
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
81
|
+
children: contentRender ? contentRender(node) : node
|
|
82
|
+
});
|
|
83
|
+
};
|
|
37
84
|
|
|
38
|
-
exports.
|
|
85
|
+
exports.EditTableContent = EditTableContent;
|
|
86
|
+
exports.TableContent = TableContent;
|
|
39
87
|
// powered by h
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DwTableProps } from "../modal";
|
|
3
|
+
import { ProColumns } from "@ant-design/pro-table/lib/typing";
|
|
4
|
+
declare const _default: ({ configData: configDataProps, request: requestProps, editTableProps, dialogTable, visible, bodyStyle, onClose, afterVisibleChange, contentRender, width, footer, ...props }: DwTableProps<ProColumns[]>) => JSX.Element;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
6
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
7
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
9
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
10
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
11
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
12
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
14
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
15
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
16
|
+
var antd = require('antd');
|
|
17
|
+
var hooks = require('./hooks.js');
|
|
18
|
+
var Content = require('./Content.js');
|
|
19
|
+
var icons = require('@ant-design/icons');
|
|
20
|
+
var index = require('../hooks/index.js');
|
|
21
|
+
|
|
22
|
+
var _excluded = ["configData", "request", "editTableProps", "dialogTable", "visible", "bodyStyle", "onClose", "afterVisibleChange", "contentRender", "width", "footer"];
|
|
23
|
+
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; }
|
|
24
|
+
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; }
|
|
25
|
+
var DwEditTable = (function (_ref) {
|
|
26
|
+
var configDataProps = _ref.configData,
|
|
27
|
+
requestProps = _ref.request,
|
|
28
|
+
_ref$editTableProps = _ref.editTableProps,
|
|
29
|
+
editTableProps = _ref$editTableProps === void 0 ? {} : _ref$editTableProps,
|
|
30
|
+
dialogTable = _ref.dialogTable,
|
|
31
|
+
_ref$visible = _ref.visible,
|
|
32
|
+
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
33
|
+
_ref$bodyStyle = _ref.bodyStyle,
|
|
34
|
+
bodyStyle = _ref$bodyStyle === void 0 ? {} : _ref$bodyStyle,
|
|
35
|
+
_onClose = _ref.onClose,
|
|
36
|
+
_afterVisibleChange = _ref.afterVisibleChange,
|
|
37
|
+
contentRender = _ref.contentRender,
|
|
38
|
+
_ref$width = _ref.width,
|
|
39
|
+
width = _ref$width === void 0 ? 888 : _ref$width,
|
|
40
|
+
_ref$footer = _ref.footer,
|
|
41
|
+
footer = _ref$footer === void 0 ? null : _ref$footer,
|
|
42
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
43
|
+
var _useVisible = hooks.useVisible(visible),
|
|
44
|
+
modalVisible = _useVisible.modalVisible,
|
|
45
|
+
setModalVisible = _useVisible.setModalVisible;
|
|
46
|
+
var className = index.useClassName("hw-table-pointer-not-hover");
|
|
47
|
+
var _useTableProps = hooks.useTableProps(_objectSpread(_objectSpread({}, props), {}, {
|
|
48
|
+
configData: configDataProps,
|
|
49
|
+
request: requestProps
|
|
50
|
+
})),
|
|
51
|
+
modalTableParams = _useTableProps.modalTableParams,
|
|
52
|
+
setModalTableParams = _useTableProps.setModalTableParams;
|
|
53
|
+
var currentTable = hooks.useCurrentTable({
|
|
54
|
+
show: function show(showParams) {
|
|
55
|
+
if (showParams) {
|
|
56
|
+
setModalTableParams(function (oldParams) {
|
|
57
|
+
var configData = oldParams.configData,
|
|
58
|
+
request = oldParams.request,
|
|
59
|
+
title = oldParams.title,
|
|
60
|
+
oldP = oldParams.params,
|
|
61
|
+
oldDataSource = oldParams.dataSource;
|
|
62
|
+
var _showParams$title = showParams.title,
|
|
63
|
+
showTitle = _showParams$title === void 0 ? title : _showParams$title,
|
|
64
|
+
_showParams$configDat = showParams.configData,
|
|
65
|
+
showConfigData = _showParams$configDat === void 0 ? configData : _showParams$configDat,
|
|
66
|
+
_showParams$request = showParams.request,
|
|
67
|
+
showReq = _showParams$request === void 0 ? request : _showParams$request,
|
|
68
|
+
_showParams$params = showParams.params,
|
|
69
|
+
params = _showParams$params === void 0 ? oldP : _showParams$params,
|
|
70
|
+
_showParams$dataSourc = showParams.dataSource,
|
|
71
|
+
dataSource = _showParams$dataSourc === void 0 ? oldDataSource : _showParams$dataSourc;
|
|
72
|
+
currentTable.params = params;
|
|
73
|
+
return {
|
|
74
|
+
title: showTitle,
|
|
75
|
+
request: showReq,
|
|
76
|
+
configData: showConfigData,
|
|
77
|
+
params: params,
|
|
78
|
+
dataSource: dataSource
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
setModalVisible(true);
|
|
83
|
+
},
|
|
84
|
+
hide: function hide() {
|
|
85
|
+
setModalVisible(false);
|
|
86
|
+
},
|
|
87
|
+
dialogTable: dialogTable
|
|
88
|
+
});
|
|
89
|
+
var configData = modalTableParams.configData,
|
|
90
|
+
request = modalTableParams.request,
|
|
91
|
+
dataSource = modalTableParams.dataSource,
|
|
92
|
+
title = modalTableParams.title,
|
|
93
|
+
params = modalTableParams.params;
|
|
94
|
+
var req = request ? function (reqParams) {
|
|
95
|
+
return request(_objectSpread(_objectSpread({}, params), reqParams));
|
|
96
|
+
} : undefined;
|
|
97
|
+
return jsxRuntime.jsx(antd.Drawer, _objectSpread(_objectSpread({}, props), {}, {
|
|
98
|
+
footer: footer,
|
|
99
|
+
visible: modalVisible,
|
|
100
|
+
onClose: function onClose(e) {
|
|
101
|
+
setModalVisible(false);
|
|
102
|
+
_onClose === null || _onClose === void 0 || _onClose(e);
|
|
103
|
+
},
|
|
104
|
+
destroyOnClose: true,
|
|
105
|
+
title: title,
|
|
106
|
+
closable: false,
|
|
107
|
+
extra: jsxRuntime.jsx(icons.CloseOutlined, {
|
|
108
|
+
className: className,
|
|
109
|
+
onClick: function onClick(e) {
|
|
110
|
+
setModalVisible(false);
|
|
111
|
+
_onClose === null || _onClose === void 0 || _onClose(e);
|
|
112
|
+
}
|
|
113
|
+
}),
|
|
114
|
+
width: width,
|
|
115
|
+
bodyStyle: _objectSpread({
|
|
116
|
+
padding: 0,
|
|
117
|
+
paddingBottom: 12
|
|
118
|
+
}, bodyStyle),
|
|
119
|
+
afterVisibleChange: function afterVisibleChange(changeVisible) {
|
|
120
|
+
if (!changeVisible) {
|
|
121
|
+
currentTable.form.resetFields();
|
|
122
|
+
}
|
|
123
|
+
_afterVisibleChange === null || _afterVisibleChange === void 0 || _afterVisibleChange(changeVisible);
|
|
124
|
+
},
|
|
125
|
+
children: jsxRuntime.jsx(Content.EditTableContent, {
|
|
126
|
+
contentRender: contentRender,
|
|
127
|
+
editTableProps: editTableProps,
|
|
128
|
+
configData: configData || [],
|
|
129
|
+
dialogTable: currentTable,
|
|
130
|
+
request: req,
|
|
131
|
+
dataSource: dataSource
|
|
132
|
+
})
|
|
133
|
+
}));
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
exports.default = DwEditTable;
|
|
137
|
+
// powered by h
|
|
@@ -122,7 +122,7 @@ var DwTable = (function (_ref) {
|
|
|
122
122
|
}
|
|
123
123
|
_afterVisibleChange === null || _afterVisibleChange === void 0 || _afterVisibleChange(changeVisible);
|
|
124
124
|
},
|
|
125
|
-
children: jsxRuntime.jsx(Content.
|
|
125
|
+
children: jsxRuntime.jsx(Content.TableContent, {
|
|
126
126
|
contentRender: contentRender,
|
|
127
127
|
tableProps: tableProps,
|
|
128
128
|
configData: configData || [],
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ModalTableProps } from "../modal";
|
|
3
|
+
import { ProColumns } from "@ant-design/pro-table/lib/typing";
|
|
4
|
+
declare const _default: ({ configData: configDataProps, request: requestProps, editTableProps, dialogTable, visible, onCancel, bodyStyle, afterClose, contentRender, width, footer, ...props }: ModalTableProps<ProColumns[]>) => JSX.Element;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
6
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
7
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
9
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
10
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
11
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
12
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
14
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
15
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
16
|
+
var antd = require('antd');
|
|
17
|
+
var hooks = require('./hooks.js');
|
|
18
|
+
var Content = require('./Content.js');
|
|
19
|
+
|
|
20
|
+
var _excluded = ["configData", "request", "editTableProps", "dialogTable", "visible", "onCancel", "bodyStyle", "afterClose", "contentRender", "width", "footer"];
|
|
21
|
+
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; }
|
|
22
|
+
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; }
|
|
23
|
+
var ModalEditTable = (function (_ref) {
|
|
24
|
+
var configDataProps = _ref.configData,
|
|
25
|
+
requestProps = _ref.request,
|
|
26
|
+
_ref$editTableProps = _ref.editTableProps,
|
|
27
|
+
editTableProps = _ref$editTableProps === void 0 ? {} : _ref$editTableProps,
|
|
28
|
+
dialogTable = _ref.dialogTable,
|
|
29
|
+
_ref$visible = _ref.visible,
|
|
30
|
+
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
31
|
+
_onCancel = _ref.onCancel,
|
|
32
|
+
_ref$bodyStyle = _ref.bodyStyle,
|
|
33
|
+
bodyStyle = _ref$bodyStyle === void 0 ? {} : _ref$bodyStyle,
|
|
34
|
+
_afterClose = _ref.afterClose,
|
|
35
|
+
contentRender = _ref.contentRender,
|
|
36
|
+
_ref$width = _ref.width,
|
|
37
|
+
width = _ref$width === void 0 ? 666 : _ref$width,
|
|
38
|
+
_ref$footer = _ref.footer,
|
|
39
|
+
footer = _ref$footer === void 0 ? null : _ref$footer,
|
|
40
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
+
var _useVisible = hooks.useVisible(visible),
|
|
42
|
+
modalVisible = _useVisible.modalVisible,
|
|
43
|
+
setModalVisible = _useVisible.setModalVisible;
|
|
44
|
+
var _useTableProps = hooks.useTableProps(_objectSpread(_objectSpread({}, props), {}, {
|
|
45
|
+
configData: configDataProps,
|
|
46
|
+
request: requestProps
|
|
47
|
+
})),
|
|
48
|
+
modalTableParams = _useTableProps.modalTableParams,
|
|
49
|
+
setModalTableParams = _useTableProps.setModalTableParams;
|
|
50
|
+
var currentTable = hooks.useCurrentTable({
|
|
51
|
+
show: function show(showParams) {
|
|
52
|
+
if (showParams) {
|
|
53
|
+
setModalTableParams(function (oldParams) {
|
|
54
|
+
var configData = oldParams.configData,
|
|
55
|
+
request = oldParams.request,
|
|
56
|
+
title = oldParams.title,
|
|
57
|
+
oldP = oldParams.params,
|
|
58
|
+
oldDataSource = oldParams.dataSource;
|
|
59
|
+
var _showParams$title = showParams.title,
|
|
60
|
+
showTitle = _showParams$title === void 0 ? title : _showParams$title,
|
|
61
|
+
_showParams$configDat = showParams.configData,
|
|
62
|
+
showConfigData = _showParams$configDat === void 0 ? configData : _showParams$configDat,
|
|
63
|
+
_showParams$request = showParams.request,
|
|
64
|
+
showReq = _showParams$request === void 0 ? request : _showParams$request,
|
|
65
|
+
_showParams$dataSourc = showParams.dataSource,
|
|
66
|
+
dataSource = _showParams$dataSourc === void 0 ? oldDataSource : _showParams$dataSourc,
|
|
67
|
+
_showParams$params = showParams.params,
|
|
68
|
+
params = _showParams$params === void 0 ? oldP : _showParams$params;
|
|
69
|
+
currentTable.params = params;
|
|
70
|
+
return {
|
|
71
|
+
title: showTitle,
|
|
72
|
+
request: showReq,
|
|
73
|
+
configData: showConfigData,
|
|
74
|
+
params: params,
|
|
75
|
+
dataSource: dataSource
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
setModalVisible(true);
|
|
80
|
+
},
|
|
81
|
+
hide: function hide() {
|
|
82
|
+
setModalVisible(false);
|
|
83
|
+
},
|
|
84
|
+
dialogTable: dialogTable
|
|
85
|
+
});
|
|
86
|
+
var configData = modalTableParams.configData,
|
|
87
|
+
dataSource = modalTableParams.dataSource,
|
|
88
|
+
request = modalTableParams.request,
|
|
89
|
+
title = modalTableParams.title,
|
|
90
|
+
params = modalTableParams.params;
|
|
91
|
+
var req = request ? function (reqParams) {
|
|
92
|
+
return request(_objectSpread(_objectSpread({}, params), reqParams));
|
|
93
|
+
} : undefined;
|
|
94
|
+
return jsxRuntime.jsx(antd.Modal, _objectSpread(_objectSpread({}, props), {}, {
|
|
95
|
+
footer: footer,
|
|
96
|
+
visible: modalVisible,
|
|
97
|
+
onCancel: function onCancel(e) {
|
|
98
|
+
setModalVisible(false);
|
|
99
|
+
_onCancel === null || _onCancel === void 0 || _onCancel(e);
|
|
100
|
+
},
|
|
101
|
+
destroyOnClose: true,
|
|
102
|
+
title: title,
|
|
103
|
+
width: width,
|
|
104
|
+
bodyStyle: _objectSpread({
|
|
105
|
+
padding: "0px 0px 12px"
|
|
106
|
+
}, bodyStyle),
|
|
107
|
+
afterClose: function afterClose() {
|
|
108
|
+
currentTable.form.resetFields();
|
|
109
|
+
_afterClose === null || _afterClose === void 0 || _afterClose();
|
|
110
|
+
},
|
|
111
|
+
children: jsxRuntime.jsx(Content.EditTableContent, {
|
|
112
|
+
contentRender: contentRender,
|
|
113
|
+
editTableProps: editTableProps,
|
|
114
|
+
configData: configData || [],
|
|
115
|
+
dialogTable: currentTable,
|
|
116
|
+
request: req,
|
|
117
|
+
dataSource: dataSource
|
|
118
|
+
})
|
|
119
|
+
}));
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
exports.default = ModalEditTable;
|
|
123
|
+
// powered by h
|
|
@@ -108,7 +108,7 @@ var ModalTable = (function (_ref) {
|
|
|
108
108
|
currentTable.form.resetFields();
|
|
109
109
|
_afterClose === null || _afterClose === void 0 || _afterClose();
|
|
110
110
|
},
|
|
111
|
-
children: jsxRuntime.jsx(Content.
|
|
111
|
+
children: jsxRuntime.jsx(Content.TableContent, {
|
|
112
112
|
contentRender: contentRender,
|
|
113
113
|
tableProps: tableProps,
|
|
114
114
|
configData: configData || [],
|
|
@@ -4,21 +4,10 @@ export declare const useHDialogTable: () => HDiaLogTableInstance;
|
|
|
4
4
|
interface ParamsModal extends HOnDiaLogTableInstance {
|
|
5
5
|
dialogTable?: HDiaLogTableInstance;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
configData: import("../modal").ConfigDataModal | undefined;
|
|
12
|
-
request: ((params: import("../modal").ParamsModal) => Promise<import("../modal").ResultModal>) | undefined;
|
|
13
|
-
dataSource: any[] | undefined;
|
|
14
|
-
};
|
|
15
|
-
setModalTableParams: import("react").Dispatch<import("react").SetStateAction<{
|
|
16
|
-
params: Record<string, any> | undefined;
|
|
17
|
-
title: import("react").ReactNode;
|
|
18
|
-
configData: import("../modal").ConfigDataModal | undefined;
|
|
19
|
-
request: ((params: import("../modal").ParamsModal) => Promise<import("../modal").ResultModal>) | undefined;
|
|
20
|
-
dataSource: any[] | undefined;
|
|
21
|
-
}>>;
|
|
7
|
+
type TablePropsModal<T> = Omit<ModalTableProps<T>, "tableProps">;
|
|
8
|
+
export declare function useTableProps<T>({ configData, params, title, request, dataSource, }: TablePropsModal<T>): {
|
|
9
|
+
modalTableParams: TablePropsModal<T>;
|
|
10
|
+
setModalTableParams: import("react").Dispatch<import("react").SetStateAction<TablePropsModal<T>>>;
|
|
22
11
|
};
|
|
23
12
|
export declare const useCurrentTable: ({ show, hide, dialogTable }: ParamsModal) => HDiaLogTableInstance;
|
|
24
13
|
export declare const useVisible: (visible: boolean) => {
|