@hw-component/table 1.2.6 → 1.2.8
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/HTableBody/Options/utils.d.ts +1 -0
- package/es/HTableBody/RowSelection.js +3 -3
- package/es/HTableBody/hooks.js +5 -7
- package/es/TableConfig.d.ts +4 -2
- package/es/TableConfig.js +5 -2
- package/es/modal.d.ts +4 -3
- package/es/render/TagsComponent.d.ts +20 -0
- package/es/render/TagsComponent.js +123 -0
- package/es/render/config.d.ts +11 -0
- package/es/render/config.js +137 -0
- package/es/render/index.d.ts +5 -0
- package/es/render/index.js +25 -0
- package/lib/HTableBody/Options/utils.d.ts +1 -0
- package/lib/HTableBody/RowSelection.js +3 -3
- package/lib/HTableBody/hooks.js +5 -7
- package/lib/TableConfig.d.ts +4 -2
- package/lib/TableConfig.js +5 -2
- package/lib/modal.d.ts +4 -3
- package/lib/render/TagsComponent.d.ts +20 -0
- package/lib/render/TagsComponent.js +126 -0
- package/lib/render/config.d.ts +11 -0
- package/lib/render/config.js +140 -0
- package/lib/render/index.d.ts +5 -0
- package/lib/render/index.js +28 -0
- package/package.json +2 -1
- package/src/components/HTableBody/RowSelection.tsx +10 -8
- package/src/components/HTableBody/hooks.tsx +5 -8
- package/src/components/HTableBody/index.tsx +64 -67
- package/src/components/HTableHeader/index.tsx +4 -2
- package/src/components/HTablePagination/index.tsx +4 -2
- package/src/components/Table.tsx +9 -4
- package/src/components/TableConfig.tsx +19 -12
- package/src/components/modal.ts +11 -3
- package/src/components/render/TagsComponent.tsx +122 -0
- package/src/components/render/config.tsx +110 -0
- package/src/components/render/index.tsx +25 -0
- package/src/pages/Table/index.tsx +160 -80
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import _Object$keys from '@babel/runtime-corejs3/core-js/object/keys';
|
|
3
|
+
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js/object/get-own-property-symbols';
|
|
4
|
+
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js/instance/filter';
|
|
5
|
+
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptor';
|
|
6
|
+
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js/instance/for-each';
|
|
7
|
+
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptors';
|
|
8
|
+
import _Object$defineProperties from '@babel/runtime-corejs3/core-js/object/define-properties';
|
|
9
|
+
import _Object$defineProperty from '@babel/runtime-corejs3/core-js/object/define-property';
|
|
10
|
+
import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
|
|
11
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
|
+
import moment from 'moment';
|
|
13
|
+
import TagsComponent from './TagsComponent.js';
|
|
14
|
+
import copy from 'copy-to-clipboard';
|
|
15
|
+
import { Typography, message, Image, Avatar } from 'antd';
|
|
16
|
+
|
|
17
|
+
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
|
+
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 Link = Typography.Link,
|
|
20
|
+
Paragraph = Typography.Paragraph;
|
|
21
|
+
var getTableVal = function getTableVal(config, itemData) {
|
|
22
|
+
var dataIndex = config.dataIndex;
|
|
23
|
+
var tableDataIndex = dataIndex;
|
|
24
|
+
return itemData[tableDataIndex];
|
|
25
|
+
};
|
|
26
|
+
var dateRender = function dateRender(config, itemData) {
|
|
27
|
+
var _config$valueTypeProp = config.valueTypeProps,
|
|
28
|
+
valueTypeProps = _config$valueTypeProp === void 0 ? {} : _config$valueTypeProp;
|
|
29
|
+
var tableVal = getTableVal(config, itemData);
|
|
30
|
+
var _valueTypeProps$forma = valueTypeProps.format,
|
|
31
|
+
format = _valueTypeProps$forma === void 0 ? "YYYY-MM-DD HH:mm:ss" : _valueTypeProps$forma,
|
|
32
|
+
_valueTypeProps$timeS = valueTypeProps.timeStampType,
|
|
33
|
+
timeStampType = _valueTypeProps$timeS === void 0 ? "X" : _valueTypeProps$timeS;
|
|
34
|
+
if (!tableVal) {
|
|
35
|
+
return "-";
|
|
36
|
+
}
|
|
37
|
+
var time = moment(tableVal, timeStampType);
|
|
38
|
+
return time.format(format);
|
|
39
|
+
};
|
|
40
|
+
var tagsRender = function tagsRender(config, itemData, index, tableInstance) {
|
|
41
|
+
var _config$valueTypeProp2 = config.valueTypeProps,
|
|
42
|
+
valueTypeProps = _config$valueTypeProp2 === void 0 ? {} : _config$valueTypeProp2;
|
|
43
|
+
var tableVal = getTableVal(config, itemData);
|
|
44
|
+
if (!tableVal) {
|
|
45
|
+
return "-";
|
|
46
|
+
}
|
|
47
|
+
return jsx(TagsComponent, _objectSpread(_objectSpread({
|
|
48
|
+
data: tableVal
|
|
49
|
+
}, valueTypeProps), {}, {
|
|
50
|
+
tableInstance: tableInstance
|
|
51
|
+
}));
|
|
52
|
+
};
|
|
53
|
+
var copyRender = function copyRender(config, itemData) {
|
|
54
|
+
var _config$valueTypeProp3 = config.valueTypeProps,
|
|
55
|
+
valueTypeProps = _config$valueTypeProp3 === void 0 ? {} : _config$valueTypeProp3,
|
|
56
|
+
title = config.title,
|
|
57
|
+
titleStr = config.titleStr;
|
|
58
|
+
var successMsg = valueTypeProps.successMsg,
|
|
59
|
+
text = valueTypeProps.text;
|
|
60
|
+
var msg = successMsg || "\u590D\u5236".concat(title || titleStr, "\u6210\u529F!");
|
|
61
|
+
var tableVal = getTableVal(config, itemData);
|
|
62
|
+
if (!tableVal) {
|
|
63
|
+
return "-";
|
|
64
|
+
}
|
|
65
|
+
var cpText = text;
|
|
66
|
+
if (typeof text === "function") {
|
|
67
|
+
cpText = text(itemData);
|
|
68
|
+
}
|
|
69
|
+
return jsx(Link, {
|
|
70
|
+
onClick: function onClick() {
|
|
71
|
+
copy(cpText || tableVal);
|
|
72
|
+
message.success(msg);
|
|
73
|
+
},
|
|
74
|
+
children: tableVal
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
var linkRender = function linkRender(config, itemData) {
|
|
78
|
+
var _config$valueTypeProp4 = config.valueTypeProps,
|
|
79
|
+
valueTypeProps = _config$valueTypeProp4 === void 0 ? {} : _config$valueTypeProp4;
|
|
80
|
+
var href = valueTypeProps.href,
|
|
81
|
+
_valueTypeProps$targe = valueTypeProps.target,
|
|
82
|
+
target = _valueTypeProps$targe === void 0 ? "_blank" : _valueTypeProps$targe;
|
|
83
|
+
var tableVal = getTableVal(config, itemData);
|
|
84
|
+
var hrefUrl = href;
|
|
85
|
+
if (typeof href === "function") {
|
|
86
|
+
hrefUrl = href(itemData);
|
|
87
|
+
}
|
|
88
|
+
return jsx(Link, {
|
|
89
|
+
href: hrefUrl || tableVal,
|
|
90
|
+
target: target,
|
|
91
|
+
children: tableVal
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
var textRender = function textRender(config, itemData) {
|
|
95
|
+
var _config$valueTypeProp5 = config.valueTypeProps,
|
|
96
|
+
valueTypeProps = _config$valueTypeProp5 === void 0 ? {} : _config$valueTypeProp5;
|
|
97
|
+
var addonBefore = valueTypeProps.addonBefore,
|
|
98
|
+
addonAfter = valueTypeProps.addonAfter,
|
|
99
|
+
type = valueTypeProps.type,
|
|
100
|
+
ellipsis = valueTypeProps.ellipsis;
|
|
101
|
+
var tableVal = getTableVal(config, itemData);
|
|
102
|
+
return jsxs(Paragraph, {
|
|
103
|
+
type: type,
|
|
104
|
+
ellipsis: ellipsis,
|
|
105
|
+
children: [addonBefore, tableVal, addonAfter]
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
var imageRender = function imageRender(config, itemData) {
|
|
109
|
+
var _config$valueTypeProp6 = config.valueTypeProps,
|
|
110
|
+
valueTypeProps = _config$valueTypeProp6 === void 0 ? {} : _config$valueTypeProp6;
|
|
111
|
+
var tableVal = getTableVal(config, itemData);
|
|
112
|
+
return jsx(Image, _objectSpread({
|
|
113
|
+
src: tableVal,
|
|
114
|
+
width: 48
|
|
115
|
+
}, valueTypeProps));
|
|
116
|
+
};
|
|
117
|
+
var avatarRender = function avatarRender(config, itemData) {
|
|
118
|
+
var _config$valueTypeProp7 = config.valueTypeProps,
|
|
119
|
+
valueTypeProps = _config$valueTypeProp7 === void 0 ? {} : _config$valueTypeProp7;
|
|
120
|
+
var tableVal = getTableVal(config, itemData);
|
|
121
|
+
return jsx(Avatar, _objectSpread({
|
|
122
|
+
src: tableVal,
|
|
123
|
+
size: 32
|
|
124
|
+
}, valueTypeProps));
|
|
125
|
+
};
|
|
126
|
+
var config = {
|
|
127
|
+
date: dateRender,
|
|
128
|
+
tags: tagsRender,
|
|
129
|
+
copy: copyRender,
|
|
130
|
+
link: linkRender,
|
|
131
|
+
text: textRender,
|
|
132
|
+
image: imageRender,
|
|
133
|
+
avatar: avatarRender
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export { config as default };
|
|
137
|
+
// powered by hdj
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ConfigItemModal, HTableInstance } from "@/components/modal";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { ValueTypeConfigModal } from "../modal";
|
|
4
|
+
declare const _default: (item: ConfigItemModal, tableInstance: HTableInstance, valueTypeConfig: ValueTypeConfigModal) => (dom: React.ReactNode, itemData: any, index: number) => React.ReactNode;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// welcome to hoo hoo hoo
|
|
2
|
+
import config from './config.js';
|
|
3
|
+
|
|
4
|
+
var configRender = (function (item, tableInstance, valueTypeConfig) {
|
|
5
|
+
var render = item.render,
|
|
6
|
+
_item$valueType = item.valueType,
|
|
7
|
+
valueType = _item$valueType === void 0 ? "" : _item$valueType;
|
|
8
|
+
return function (dom, itemData, index) {
|
|
9
|
+
var valType = valueType;
|
|
10
|
+
var node = dom;
|
|
11
|
+
if (config[valType]) {
|
|
12
|
+
node = config[valType](item, itemData, index, tableInstance);
|
|
13
|
+
}
|
|
14
|
+
if (valueTypeConfig[valType]) {
|
|
15
|
+
node = valueTypeConfig[valType](item, itemData, index, tableInstance);
|
|
16
|
+
}
|
|
17
|
+
if (render) {
|
|
18
|
+
return render(node, itemData, index, tableInstance);
|
|
19
|
+
}
|
|
20
|
+
return node;
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export { configRender as default };
|
|
25
|
+
// powered by hdj
|
|
@@ -57,6 +57,7 @@ export declare const getItemValue: (data: ConfigItemModal) => {
|
|
|
57
57
|
searchType?: string | undefined;
|
|
58
58
|
searchRender?: ((item: import("@hw-component/form/es/Form/modal").HItemProps, node: React.ReactNode, form: import("antd").FormInstance<any>, tableInstance: import("../../modal").HTableInstance) => React.ReactNode) | undefined;
|
|
59
59
|
rowSelectionTitle?: boolean | undefined;
|
|
60
|
+
valueTypeProps?: Record<string, any> | undefined;
|
|
60
61
|
index?: number | undefined;
|
|
61
62
|
filters?: boolean | import("antd/lib/table/interface").ColumnFilterItem[] | undefined;
|
|
62
63
|
onFilter?: boolean | ((value: string | number | boolean, record: any) => boolean) | undefined;
|
|
@@ -144,9 +144,9 @@ var RowSelectionBox = function RowSelectionBox(_ref5) {
|
|
|
144
144
|
onChange === null || onChange === void 0 || onChange(newKeys, newRowData);
|
|
145
145
|
return;
|
|
146
146
|
}
|
|
147
|
-
var
|
|
148
|
-
_spliceInstanceProperty(newKeys).call(newKeys,
|
|
149
|
-
_spliceInstanceProperty(newRowData).call(newRowData,
|
|
147
|
+
var keyIndex = _indexOfInstanceProperty(newKeys).call(newKeys, key);
|
|
148
|
+
_spliceInstanceProperty(newKeys).call(newKeys, keyIndex, 1);
|
|
149
|
+
_spliceInstanceProperty(newRowData).call(newRowData, keyIndex, 1);
|
|
150
150
|
rowOnChange(newKeys, newRowData);
|
|
151
151
|
onChange === null || onChange === void 0 || onChange(newKeys, newRowData);
|
|
152
152
|
};
|
package/lib/HTableBody/hooks.js
CHANGED
|
@@ -18,6 +18,8 @@ var React = require('react');
|
|
|
18
18
|
var context = require('../context.js');
|
|
19
19
|
var RowSelection = require('./RowSelection.js');
|
|
20
20
|
var utils = require('./utils.js');
|
|
21
|
+
var index = require('../render/index.js');
|
|
22
|
+
var TableConfig = require('../TableConfig.js');
|
|
21
23
|
|
|
22
24
|
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; }
|
|
23
25
|
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; }
|
|
@@ -53,6 +55,8 @@ var useCols = function useCols(_ref2) {
|
|
|
53
55
|
_useState2 = _slicedToArray(_useState, 2),
|
|
54
56
|
cols = _useState2[0],
|
|
55
57
|
setCols = _useState2[1];
|
|
58
|
+
var _useHTableConfigConte = TableConfig.useHTableConfigContext({}),
|
|
59
|
+
valueTypeConfig = _useHTableConfigConte.valueTypeConfig;
|
|
56
60
|
var changeConfigData = function changeConfigData(data) {
|
|
57
61
|
var colsArray = _filterInstanceProperty(data).call(data, function (item) {
|
|
58
62
|
return !item.hideInTable;
|
|
@@ -61,14 +65,8 @@ var useCols = function useCols(_ref2) {
|
|
|
61
65
|
_spliceInstanceProperty(colsArray).call(colsArray, 0, 0, rowSelectionCol(rowSelection));
|
|
62
66
|
}
|
|
63
67
|
return _mapInstanceProperty(colsArray).call(colsArray, function (item) {
|
|
64
|
-
var _render = item.render;
|
|
65
68
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
66
|
-
render:
|
|
67
|
-
if (!_render) {
|
|
68
|
-
return dom;
|
|
69
|
-
}
|
|
70
|
-
return _render(dom, itemData, index, table);
|
|
71
|
-
}
|
|
69
|
+
render: index.default(item, table, valueTypeConfig)
|
|
72
70
|
});
|
|
73
71
|
});
|
|
74
72
|
};
|
package/lib/TableConfig.d.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type { HTableInstance } from "
|
|
2
|
+
import type { HTableInstance, ValueTypeConfigModal } from "./modal";
|
|
3
3
|
interface HTableConfigContextModal {
|
|
4
4
|
emptyRender?: (table: HTableInstance) => React.ReactNode;
|
|
5
5
|
errorRender?: (table: HTableInstance, error: Error) => React.ReactNode;
|
|
6
6
|
headerStyle?: React.CSSProperties;
|
|
7
7
|
tableStyle?: React.CSSProperties;
|
|
8
8
|
paginationStyle?: React.CSSProperties;
|
|
9
|
+
valueTypeConfig?: ValueTypeConfigModal;
|
|
9
10
|
}
|
|
10
11
|
export declare const HTableConfigContext: React.Context<HTableConfigContextModal | null>;
|
|
11
|
-
export declare const useHTableConfigContext: ({ emptyRender, errorRender, headerStyle, tableStyle, paginationStyle }: HTableConfigContextModal) => {
|
|
12
|
+
export declare const useHTableConfigContext: ({ emptyRender, errorRender, headerStyle, tableStyle, paginationStyle, }: HTableConfigContextModal) => {
|
|
12
13
|
errorRender: ((table: HTableInstance, error: Error) => React.ReactNode) | undefined;
|
|
13
14
|
emptyRender: ((table: HTableInstance) => React.ReactNode) | undefined;
|
|
14
15
|
headerStyle: React.CSSProperties | undefined;
|
|
15
16
|
tableStyle: React.CSSProperties | undefined;
|
|
16
17
|
paginationStyle: React.CSSProperties | undefined;
|
|
18
|
+
valueTypeConfig: ValueTypeConfigModal;
|
|
17
19
|
};
|
|
18
20
|
declare const Index: React.FC<HTableConfigContextModal>;
|
|
19
21
|
export default Index;
|
package/lib/TableConfig.js
CHANGED
|
@@ -19,13 +19,16 @@ var useHTableConfigContext = function useHTableConfigContext(_ref) {
|
|
|
19
19
|
configEmptyRender = _ref2.emptyRender,
|
|
20
20
|
configHeaderStyle = _ref2.headerStyle,
|
|
21
21
|
configTableStyle = _ref2.tableStyle,
|
|
22
|
-
configPaginationStyle = _ref2.paginationStyle
|
|
22
|
+
configPaginationStyle = _ref2.paginationStyle,
|
|
23
|
+
_ref2$valueTypeConfig = _ref2.valueTypeConfig,
|
|
24
|
+
valueTypeConfig = _ref2$valueTypeConfig === void 0 ? {} : _ref2$valueTypeConfig;
|
|
23
25
|
return {
|
|
24
26
|
errorRender: errorRender || configErrorRender,
|
|
25
27
|
emptyRender: emptyRender || configEmptyRender,
|
|
26
28
|
headerStyle: headerStyle || configHeaderStyle,
|
|
27
29
|
tableStyle: tableStyle || configTableStyle,
|
|
28
|
-
paginationStyle: paginationStyle || configPaginationStyle
|
|
30
|
+
paginationStyle: paginationStyle || configPaginationStyle,
|
|
31
|
+
valueTypeConfig: valueTypeConfig
|
|
29
32
|
};
|
|
30
33
|
};
|
|
31
34
|
var Index = function Index(_ref3) {
|
package/lib/modal.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ interface HColumns extends Omit<ProColumns, "render" | "title"> {
|
|
|
29
29
|
searchRender?: (item: HItemProps, node: React.ReactNode, form: FormInstance, tableInstance: HTableInstance) => React.ReactNode;
|
|
30
30
|
rowSelectionTitle?: boolean;
|
|
31
31
|
title?: string | React.ReactNode;
|
|
32
|
+
valueTypeProps?: Record<string, any>;
|
|
32
33
|
}
|
|
33
34
|
interface BcItemModal {
|
|
34
35
|
childrenDataIndex?: ConfigItemModal[] | string[];
|
|
@@ -42,11 +43,10 @@ export type actionFn = (...arg: any[]) => void;
|
|
|
42
43
|
export interface RowSelectionOuter {
|
|
43
44
|
allPageCheck?: boolean;
|
|
44
45
|
}
|
|
45
|
-
type RowKeyFn = (data: any, index: number) => string;
|
|
46
46
|
export type HRowSelection = RowSelectionOuter & (TableProps<any>["rowSelection"] & {
|
|
47
47
|
alwaysShowAlert?: boolean;
|
|
48
48
|
});
|
|
49
|
-
export interface HTableProps extends Omit<ProTableProps<any, any>, "request" | "dataSource" | "
|
|
49
|
+
export interface HTableProps extends Omit<ProTableProps<any, any>, "request" | "dataSource" | "rowSelection"> {
|
|
50
50
|
request?: (params: ParamsModal) => Promise<ResultModal>;
|
|
51
51
|
configData: ConfigDataModal;
|
|
52
52
|
searchSpan?: ColProps;
|
|
@@ -65,7 +65,6 @@ export interface HTableProps extends Omit<ProTableProps<any, any>, "request" | "
|
|
|
65
65
|
manual?: boolean;
|
|
66
66
|
dataSource?: ResultModal;
|
|
67
67
|
paginationStyle?: React.CSSProperties;
|
|
68
|
-
rowKey?: string | RowKeyFn;
|
|
69
68
|
allPageCheck?: boolean;
|
|
70
69
|
rowSelection?: HRowSelection | false;
|
|
71
70
|
affixProps?: AffixProps | false;
|
|
@@ -121,4 +120,6 @@ export interface ModalTableProps extends ModalProps {
|
|
|
121
120
|
configData?: HTableProps["configData"];
|
|
122
121
|
request?: HTableProps["request"];
|
|
123
122
|
}
|
|
123
|
+
export type ValueTypeConfigRenderFn = (config: ConfigItemModal, itemData: any, index: number, tableInstance: HTableInstance) => React.ReactNode;
|
|
124
|
+
export type ValueTypeConfigModal = Record<string, ValueTypeConfigRenderFn>;
|
|
124
125
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { TooltipProps } from "antd/lib/tooltip";
|
|
3
|
+
import type { HTableInstance } from "@/components/modal";
|
|
4
|
+
type CloseFn = (key: string, tableInstance?: HTableInstance) => void;
|
|
5
|
+
interface IProps {
|
|
6
|
+
data: any[];
|
|
7
|
+
closable?: boolean;
|
|
8
|
+
onClose?: CloseFn;
|
|
9
|
+
color?: string;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
tooltip?: boolean | TooltipProps;
|
|
12
|
+
fieldNames?: {
|
|
13
|
+
label?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
};
|
|
16
|
+
tableInstance?: HTableInstance;
|
|
17
|
+
maxLen?: number | null;
|
|
18
|
+
}
|
|
19
|
+
declare const TagsComponent: (props: IProps) => JSX.Element;
|
|
20
|
+
export default TagsComponent;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js/object/keys');
|
|
6
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js/object/get-own-property-symbols');
|
|
7
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js/instance/filter');
|
|
8
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js/object/get-own-property-descriptor');
|
|
9
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js/instance/for-each');
|
|
10
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js/object/get-own-property-descriptors');
|
|
11
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js/object/define-properties');
|
|
12
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js/object/define-property');
|
|
13
|
+
var _Symbol$toPrimitive = require('@babel/runtime-corejs3/core-js/symbol/to-primitive');
|
|
14
|
+
var _typeof = require('@babel/runtime-corejs3/helpers/typeof');
|
|
15
|
+
var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
|
|
16
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
17
|
+
require('core-js/modules/es.number.constructor.js');
|
|
18
|
+
require('core-js/modules/es.object.to-string.js');
|
|
19
|
+
require('core-js/modules/es.regexp.to-string.js');
|
|
20
|
+
var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js/instance/slice');
|
|
21
|
+
var _mapInstanceProperty = require('@babel/runtime-corejs3/core-js/instance/map');
|
|
22
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
23
|
+
var antd = require('antd');
|
|
24
|
+
var React = require('react');
|
|
25
|
+
|
|
26
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
27
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[_Symbol$toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
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
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
|
+
var getTooltipProps = function getTooltipProps(title, tooltip) {
|
|
31
|
+
if (!tooltip) {
|
|
32
|
+
return {
|
|
33
|
+
title: null
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (tooltip === true) {
|
|
37
|
+
return {
|
|
38
|
+
title: title
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return _objectSpread(_objectSpread({}, tooltip), {}, {
|
|
42
|
+
title: title
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var TagsComponent = function TagsComponent(props) {
|
|
46
|
+
var data = props.data,
|
|
47
|
+
closable = props.closable,
|
|
48
|
+
_onClose = props.onClose,
|
|
49
|
+
color = props.color,
|
|
50
|
+
icon = props.icon,
|
|
51
|
+
_props$fieldNames = props.fieldNames,
|
|
52
|
+
fieldNames = _props$fieldNames === void 0 ? {} : _props$fieldNames,
|
|
53
|
+
tooltip = props.tooltip,
|
|
54
|
+
tableInstance = props.tableInstance,
|
|
55
|
+
maxLen = props.maxLen;
|
|
56
|
+
var _fieldNames$label = fieldNames.label,
|
|
57
|
+
label = _fieldNames$label === void 0 ? "label" : _fieldNames$label,
|
|
58
|
+
_fieldNames$value = fieldNames.value,
|
|
59
|
+
value = _fieldNames$value === void 0 ? "value" : _fieldNames$value;
|
|
60
|
+
var _useMemo = React.useMemo(function () {
|
|
61
|
+
if (!maxLen || !data) {
|
|
62
|
+
return {
|
|
63
|
+
tagData: data
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
var resultTagData = _sliceInstanceProperty(data).call(data, 0, maxLen);
|
|
67
|
+
var resultMoreTag = _sliceInstanceProperty(data).call(data, maxLen);
|
|
68
|
+
return {
|
|
69
|
+
tagData: resultTagData,
|
|
70
|
+
moreTag: resultMoreTag
|
|
71
|
+
};
|
|
72
|
+
}, [data, maxLen]),
|
|
73
|
+
tagData = _useMemo.tagData,
|
|
74
|
+
moreTag = _useMemo.moreTag;
|
|
75
|
+
var moreLen = moreTag === null || moreTag === void 0 ? void 0 : moreTag.length;
|
|
76
|
+
return jsxRuntime.jsxs(antd.Row, {
|
|
77
|
+
gutter: [8, 8],
|
|
78
|
+
children: [tagData === null || tagData === void 0 ? void 0 : _mapInstanceProperty(tagData).call(tagData, function (tagItem, index) {
|
|
79
|
+
var _context;
|
|
80
|
+
var tagProps = {
|
|
81
|
+
closable: closable,
|
|
82
|
+
onClose: _onClose,
|
|
83
|
+
color: color,
|
|
84
|
+
icon: icon
|
|
85
|
+
};
|
|
86
|
+
var indexKey = index.toString();
|
|
87
|
+
if (typeof tagItem === "string") {
|
|
88
|
+
var _tooltipProps = getTooltipProps(tagItem, tooltip);
|
|
89
|
+
return jsxRuntime.jsx(antd.Tooltip, _objectSpread(_objectSpread({}, _tooltipProps), {}, {
|
|
90
|
+
children: jsxRuntime.jsx(antd.Tag, _objectSpread(_objectSpread({}, tagProps), {}, {
|
|
91
|
+
onClose: function onClose(e) {
|
|
92
|
+
e.preventDefault();
|
|
93
|
+
_onClose === null || _onClose === void 0 || _onClose(indexKey, tableInstance);
|
|
94
|
+
},
|
|
95
|
+
children: tagItem
|
|
96
|
+
}), indexKey)
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
var tagLabel = tagItem[label],
|
|
100
|
+
tagValue = tagItem[value],
|
|
101
|
+
itemProps = _objectWithoutProperties(tagItem, _mapInstanceProperty(_context = [label, value]).call(_context, _toPropertyKey));
|
|
102
|
+
var tooltipProps = getTooltipProps(tagLabel, tooltip);
|
|
103
|
+
var cuTagProps = _objectSpread(_objectSpread({}, tagProps), itemProps);
|
|
104
|
+
var cuKey = tagValue || indexKey;
|
|
105
|
+
return jsxRuntime.jsx(antd.Tooltip, _objectSpread(_objectSpread({}, tooltipProps), {}, {
|
|
106
|
+
children: jsxRuntime.jsx(antd.Tag, _objectSpread(_objectSpread({}, cuTagProps), {}, {
|
|
107
|
+
onClose: function onClose(e) {
|
|
108
|
+
e.preventDefault();
|
|
109
|
+
cuTagProps === null || cuTagProps === void 0 || cuTagProps.onClose(cuKey, tableInstance);
|
|
110
|
+
},
|
|
111
|
+
children: tagLabel
|
|
112
|
+
}), cuKey)
|
|
113
|
+
}));
|
|
114
|
+
}), !moreLen ? null : jsxRuntime.jsx(antd.Popover, {
|
|
115
|
+
content: jsxRuntime.jsx(TagsComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
116
|
+
maxLen: null
|
|
117
|
+
})),
|
|
118
|
+
children: jsxRuntime.jsxs(antd.Tag, {
|
|
119
|
+
children: ["...\u7B49", data.length, "\u4E2A"]
|
|
120
|
+
})
|
|
121
|
+
})]
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
exports.default = TagsComponent;
|
|
126
|
+
// powered by h
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ConfigItemModal, HTableInstance } from "@/components/modal";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
date: (config: ConfigItemModal, itemData: any) => string;
|
|
4
|
+
tags: (config: ConfigItemModal, itemData: any, index: number, tableInstance: HTableInstance) => "-" | JSX.Element;
|
|
5
|
+
copy: (config: ConfigItemModal, itemData: any) => "-" | JSX.Element;
|
|
6
|
+
link: (config: ConfigItemModal, itemData: any) => JSX.Element;
|
|
7
|
+
text: (config: ConfigItemModal, itemData: any) => JSX.Element;
|
|
8
|
+
image: (config: ConfigItemModal, itemData: any) => JSX.Element;
|
|
9
|
+
avatar: (config: ConfigItemModal, itemData: any) => JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js/object/keys');
|
|
6
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js/object/get-own-property-symbols');
|
|
7
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js/instance/filter');
|
|
8
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js/object/get-own-property-descriptor');
|
|
9
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js/instance/for-each');
|
|
10
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js/object/get-own-property-descriptors');
|
|
11
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js/object/define-properties');
|
|
12
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js/object/define-property');
|
|
13
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
14
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
15
|
+
var moment = require('moment');
|
|
16
|
+
var TagsComponent = require('./TagsComponent.js');
|
|
17
|
+
var copy = require('copy-to-clipboard');
|
|
18
|
+
var antd = require('antd');
|
|
19
|
+
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
var Link = antd.Typography.Link,
|
|
23
|
+
Paragraph = antd.Typography.Paragraph;
|
|
24
|
+
var getTableVal = function getTableVal(config, itemData) {
|
|
25
|
+
var dataIndex = config.dataIndex;
|
|
26
|
+
var tableDataIndex = dataIndex;
|
|
27
|
+
return itemData[tableDataIndex];
|
|
28
|
+
};
|
|
29
|
+
var dateRender = function dateRender(config, itemData) {
|
|
30
|
+
var _config$valueTypeProp = config.valueTypeProps,
|
|
31
|
+
valueTypeProps = _config$valueTypeProp === void 0 ? {} : _config$valueTypeProp;
|
|
32
|
+
var tableVal = getTableVal(config, itemData);
|
|
33
|
+
var _valueTypeProps$forma = valueTypeProps.format,
|
|
34
|
+
format = _valueTypeProps$forma === void 0 ? "YYYY-MM-DD HH:mm:ss" : _valueTypeProps$forma,
|
|
35
|
+
_valueTypeProps$timeS = valueTypeProps.timeStampType,
|
|
36
|
+
timeStampType = _valueTypeProps$timeS === void 0 ? "X" : _valueTypeProps$timeS;
|
|
37
|
+
if (!tableVal) {
|
|
38
|
+
return "-";
|
|
39
|
+
}
|
|
40
|
+
var time = moment(tableVal, timeStampType);
|
|
41
|
+
return time.format(format);
|
|
42
|
+
};
|
|
43
|
+
var tagsRender = function tagsRender(config, itemData, index, tableInstance) {
|
|
44
|
+
var _config$valueTypeProp2 = config.valueTypeProps,
|
|
45
|
+
valueTypeProps = _config$valueTypeProp2 === void 0 ? {} : _config$valueTypeProp2;
|
|
46
|
+
var tableVal = getTableVal(config, itemData);
|
|
47
|
+
if (!tableVal) {
|
|
48
|
+
return "-";
|
|
49
|
+
}
|
|
50
|
+
return jsxRuntime.jsx(TagsComponent.default, _objectSpread(_objectSpread({
|
|
51
|
+
data: tableVal
|
|
52
|
+
}, valueTypeProps), {}, {
|
|
53
|
+
tableInstance: tableInstance
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
var copyRender = function copyRender(config, itemData) {
|
|
57
|
+
var _config$valueTypeProp3 = config.valueTypeProps,
|
|
58
|
+
valueTypeProps = _config$valueTypeProp3 === void 0 ? {} : _config$valueTypeProp3,
|
|
59
|
+
title = config.title,
|
|
60
|
+
titleStr = config.titleStr;
|
|
61
|
+
var successMsg = valueTypeProps.successMsg,
|
|
62
|
+
text = valueTypeProps.text;
|
|
63
|
+
var msg = successMsg || "\u590D\u5236".concat(title || titleStr, "\u6210\u529F!");
|
|
64
|
+
var tableVal = getTableVal(config, itemData);
|
|
65
|
+
if (!tableVal) {
|
|
66
|
+
return "-";
|
|
67
|
+
}
|
|
68
|
+
var cpText = text;
|
|
69
|
+
if (typeof text === "function") {
|
|
70
|
+
cpText = text(itemData);
|
|
71
|
+
}
|
|
72
|
+
return jsxRuntime.jsx(Link, {
|
|
73
|
+
onClick: function onClick() {
|
|
74
|
+
copy(cpText || tableVal);
|
|
75
|
+
antd.message.success(msg);
|
|
76
|
+
},
|
|
77
|
+
children: tableVal
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
var linkRender = function linkRender(config, itemData) {
|
|
81
|
+
var _config$valueTypeProp4 = config.valueTypeProps,
|
|
82
|
+
valueTypeProps = _config$valueTypeProp4 === void 0 ? {} : _config$valueTypeProp4;
|
|
83
|
+
var href = valueTypeProps.href,
|
|
84
|
+
_valueTypeProps$targe = valueTypeProps.target,
|
|
85
|
+
target = _valueTypeProps$targe === void 0 ? "_blank" : _valueTypeProps$targe;
|
|
86
|
+
var tableVal = getTableVal(config, itemData);
|
|
87
|
+
var hrefUrl = href;
|
|
88
|
+
if (typeof href === "function") {
|
|
89
|
+
hrefUrl = href(itemData);
|
|
90
|
+
}
|
|
91
|
+
return jsxRuntime.jsx(Link, {
|
|
92
|
+
href: hrefUrl || tableVal,
|
|
93
|
+
target: target,
|
|
94
|
+
children: tableVal
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
var textRender = function textRender(config, itemData) {
|
|
98
|
+
var _config$valueTypeProp5 = config.valueTypeProps,
|
|
99
|
+
valueTypeProps = _config$valueTypeProp5 === void 0 ? {} : _config$valueTypeProp5;
|
|
100
|
+
var addonBefore = valueTypeProps.addonBefore,
|
|
101
|
+
addonAfter = valueTypeProps.addonAfter,
|
|
102
|
+
type = valueTypeProps.type,
|
|
103
|
+
ellipsis = valueTypeProps.ellipsis;
|
|
104
|
+
var tableVal = getTableVal(config, itemData);
|
|
105
|
+
return jsxRuntime.jsxs(Paragraph, {
|
|
106
|
+
type: type,
|
|
107
|
+
ellipsis: ellipsis,
|
|
108
|
+
children: [addonBefore, tableVal, addonAfter]
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
var imageRender = function imageRender(config, itemData) {
|
|
112
|
+
var _config$valueTypeProp6 = config.valueTypeProps,
|
|
113
|
+
valueTypeProps = _config$valueTypeProp6 === void 0 ? {} : _config$valueTypeProp6;
|
|
114
|
+
var tableVal = getTableVal(config, itemData);
|
|
115
|
+
return jsxRuntime.jsx(antd.Image, _objectSpread({
|
|
116
|
+
src: tableVal,
|
|
117
|
+
width: 48
|
|
118
|
+
}, valueTypeProps));
|
|
119
|
+
};
|
|
120
|
+
var avatarRender = function avatarRender(config, itemData) {
|
|
121
|
+
var _config$valueTypeProp7 = config.valueTypeProps,
|
|
122
|
+
valueTypeProps = _config$valueTypeProp7 === void 0 ? {} : _config$valueTypeProp7;
|
|
123
|
+
var tableVal = getTableVal(config, itemData);
|
|
124
|
+
return jsxRuntime.jsx(antd.Avatar, _objectSpread({
|
|
125
|
+
src: tableVal,
|
|
126
|
+
size: 32
|
|
127
|
+
}, valueTypeProps));
|
|
128
|
+
};
|
|
129
|
+
var config = {
|
|
130
|
+
date: dateRender,
|
|
131
|
+
tags: tagsRender,
|
|
132
|
+
copy: copyRender,
|
|
133
|
+
link: linkRender,
|
|
134
|
+
text: textRender,
|
|
135
|
+
image: imageRender,
|
|
136
|
+
avatar: avatarRender
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
exports.default = config;
|
|
140
|
+
// powered by h
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ConfigItemModal, HTableInstance } from "@/components/modal";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { ValueTypeConfigModal } from "../modal";
|
|
4
|
+
declare const _default: (item: ConfigItemModal, tableInstance: HTableInstance, valueTypeConfig: ValueTypeConfigModal) => (dom: React.ReactNode, itemData: any, index: number) => React.ReactNode;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var config = require('./config.js');
|
|
6
|
+
|
|
7
|
+
var configRender = (function (item, tableInstance, valueTypeConfig) {
|
|
8
|
+
var render = item.render,
|
|
9
|
+
_item$valueType = item.valueType,
|
|
10
|
+
valueType = _item$valueType === void 0 ? "" : _item$valueType;
|
|
11
|
+
return function (dom, itemData, index) {
|
|
12
|
+
var valType = valueType;
|
|
13
|
+
var node = dom;
|
|
14
|
+
if (config.default[valType]) {
|
|
15
|
+
node = config.default[valType](item, itemData, index, tableInstance);
|
|
16
|
+
}
|
|
17
|
+
if (valueTypeConfig[valType]) {
|
|
18
|
+
node = valueTypeConfig[valType](item, itemData, index, tableInstance);
|
|
19
|
+
}
|
|
20
|
+
if (render) {
|
|
21
|
+
return render(node, itemData, index, tableInstance);
|
|
22
|
+
}
|
|
23
|
+
return node;
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
exports.default = configRender;
|
|
28
|
+
// powered by h
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hw-component/table",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "基于antd二次开发table组件",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"table"
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@hw-component/form": "1.5.2",
|
|
35
35
|
"ahooks": "2.10.9",
|
|
36
36
|
"antd": "4.20.7",
|
|
37
|
+
"copy-to-clipboard": "3.3.1",
|
|
37
38
|
"core-js": "3",
|
|
38
39
|
"react": "17.0.0",
|
|
39
40
|
"react-dom": "17.0.2",
|