@hw-component/table 1.2.7 → 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/RowSelection.js +3 -3
- package/es/TableConfig.d.ts +1 -1
- package/es/render/TagsComponent.d.ts +2 -2
- package/es/render/TagsComponent.js +6 -6
- package/es/render/config.d.ts +3 -1
- package/es/render/config.js +22 -2
- package/es/render/index.d.ts +4 -4
- package/es/render/index.js +7 -6
- package/lib/HTableBody/RowSelection.js +3 -3
- package/lib/TableConfig.d.ts +1 -1
- package/lib/render/TagsComponent.d.ts +2 -2
- package/lib/render/TagsComponent.js +6 -6
- package/lib/render/config.d.ts +3 -1
- package/lib/render/config.js +21 -1
- package/lib/render/index.d.ts +4 -4
- package/lib/render/index.js +7 -6
- package/package.json +1 -1
- package/src/components/HTableBody/RowSelection.tsx +10 -8
- package/src/components/HTableBody/hooks.tsx +4 -4
- 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 +18 -13
- package/src/components/modal.ts +10 -5
- package/src/components/render/TagsComponent.tsx +117 -86
- package/src/components/render/config.tsx +103 -68
- package/src/components/render/index.tsx +25 -20
- package/src/pages/Table/index.tsx +131 -121
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
import React, { useContext } from "react";
|
|
2
|
-
import type { HTableInstance
|
|
2
|
+
import type { HTableInstance, ValueTypeConfigModal } from "./modal";
|
|
3
3
|
|
|
4
4
|
interface HTableConfigContextModal {
|
|
5
5
|
emptyRender?: (table: HTableInstance) => React.ReactNode;
|
|
6
6
|
errorRender?: (table: HTableInstance, error: Error) => React.ReactNode;
|
|
7
|
-
headerStyle?:React.CSSProperties;
|
|
8
|
-
tableStyle?:React.CSSProperties;
|
|
9
|
-
paginationStyle?:React.CSSProperties;
|
|
10
|
-
valueTypeConfig?:ValueTypeConfigModal;
|
|
7
|
+
headerStyle?: React.CSSProperties;
|
|
8
|
+
tableStyle?: React.CSSProperties;
|
|
9
|
+
paginationStyle?: React.CSSProperties;
|
|
10
|
+
valueTypeConfig?: ValueTypeConfigModal;
|
|
11
11
|
}
|
|
12
12
|
export const HTableConfigContext =
|
|
13
13
|
React.createContext<HTableConfigContextModal | null>(null);
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
export const useHTableConfigContext = ({
|
|
17
16
|
emptyRender,
|
|
18
17
|
errorRender,
|
|
19
18
|
headerStyle,
|
|
20
19
|
tableStyle,
|
|
21
|
-
paginationStyle
|
|
20
|
+
paginationStyle,
|
|
22
21
|
}: HTableConfigContextModal) => {
|
|
23
|
-
const {
|
|
24
|
-
|
|
22
|
+
const {
|
|
23
|
+
errorRender: configErrorRender,
|
|
24
|
+
emptyRender: configEmptyRender,
|
|
25
|
+
headerStyle: configHeaderStyle,
|
|
26
|
+
tableStyle: configTableStyle,
|
|
27
|
+
paginationStyle: configPaginationStyle,
|
|
28
|
+
valueTypeConfig = {},
|
|
29
|
+
} = useContext(HTableConfigContext) || {};
|
|
25
30
|
|
|
26
31
|
return {
|
|
27
32
|
errorRender: errorRender || configErrorRender,
|
|
28
33
|
emptyRender: emptyRender || configEmptyRender,
|
|
29
|
-
headerStyle:headerStyle||configHeaderStyle,
|
|
30
|
-
tableStyle:tableStyle||configTableStyle,
|
|
31
|
-
paginationStyle:paginationStyle||configPaginationStyle,
|
|
32
|
-
valueTypeConfig
|
|
34
|
+
headerStyle: headerStyle || configHeaderStyle,
|
|
35
|
+
tableStyle: tableStyle || configTableStyle,
|
|
36
|
+
paginationStyle: paginationStyle || configPaginationStyle,
|
|
37
|
+
valueTypeConfig,
|
|
33
38
|
};
|
|
34
39
|
};
|
|
35
40
|
const Index: React.FC<HTableConfigContextModal> = ({ children, ...props }) => {
|
package/src/components/modal.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type { ModalProps } from "antd";
|
|
|
10
10
|
import type { TableProps } from "antd/lib/table";
|
|
11
11
|
import type { AffixProps } from "antd/lib/affix";
|
|
12
12
|
import type { OptionModal } from "./HTableBody";
|
|
13
|
-
import {GetRowKey} from "rc-table/lib/interface";
|
|
13
|
+
import { GetRowKey } from "rc-table/lib/interface";
|
|
14
14
|
|
|
15
15
|
export interface RowObj {
|
|
16
16
|
keys?: React.Key[];
|
|
@@ -44,7 +44,7 @@ interface HColumns extends Omit<ProColumns, "render" | "title"> {
|
|
|
44
44
|
) => React.ReactNode;
|
|
45
45
|
rowSelectionTitle?: boolean;
|
|
46
46
|
title?: string | React.ReactNode;
|
|
47
|
-
valueTypeProps?:Record<string, any
|
|
47
|
+
valueTypeProps?: Record<string, any>;
|
|
48
48
|
}
|
|
49
49
|
interface BcItemModal {
|
|
50
50
|
childrenDataIndex?: ConfigItemModal[] | string[];
|
|
@@ -75,7 +75,7 @@ export type HRowSelection = RowSelectionOuter &
|
|
|
75
75
|
export interface HTableProps
|
|
76
76
|
extends Omit<
|
|
77
77
|
ProTableProps<any, any>,
|
|
78
|
-
"request" | "dataSource"| "rowSelection"
|
|
78
|
+
"request" | "dataSource" | "rowSelection"
|
|
79
79
|
> {
|
|
80
80
|
request?: (params: ParamsModal) => Promise<ResultModal>;
|
|
81
81
|
configData: ConfigDataModal;
|
|
@@ -154,5 +154,10 @@ export interface ModalTableProps extends ModalProps {
|
|
|
154
154
|
request?: HTableProps["request"];
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
export type ValueTypeConfigRenderFn=(
|
|
158
|
-
|
|
157
|
+
export type ValueTypeConfigRenderFn = (
|
|
158
|
+
config: ConfigItemModal,
|
|
159
|
+
itemData: any,
|
|
160
|
+
index: number,
|
|
161
|
+
tableInstance: HTableInstance
|
|
162
|
+
) => React.ReactNode;
|
|
163
|
+
export type ValueTypeConfigModal = Record<string, ValueTypeConfigRenderFn>;
|
|
@@ -1,91 +1,122 @@
|
|
|
1
|
-
import {Row, Tag,Tooltip,Popover} from "antd";
|
|
2
|
-
import React, {useMemo} from "react";
|
|
3
|
-
import {TooltipProps} from "antd/lib/tooltip";
|
|
4
|
-
import {HTableInstance} from "@/components/modal";
|
|
5
|
-
type CloseFn=(key:string,tableInstance?:HTableInstance)=>void;
|
|
1
|
+
import { Row, Tag, Tooltip, Popover } from "antd";
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
|
+
import type { TooltipProps } from "antd/lib/tooltip";
|
|
4
|
+
import type { HTableInstance } from "@/components/modal";
|
|
5
|
+
type CloseFn = (key: string, tableInstance?: HTableInstance) => void;
|
|
6
6
|
interface IProps {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
data: any[];
|
|
8
|
+
closable?: boolean;
|
|
9
|
+
onClose?: CloseFn;
|
|
10
|
+
color?: string;
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
tooltip?: boolean | TooltipProps;
|
|
13
|
+
fieldNames?: { label?: string; value?: string };
|
|
14
|
+
tableInstance?: HTableInstance;
|
|
15
|
+
maxLen?: number | null;
|
|
16
16
|
}
|
|
17
|
-
const getTooltipProps=(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
const getTooltipProps = (
|
|
18
|
+
title: string,
|
|
19
|
+
tooltip?: boolean | TooltipProps
|
|
20
|
+
): TooltipProps => {
|
|
21
|
+
if (!tooltip) {
|
|
22
|
+
return {
|
|
23
|
+
title: null,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
if (tooltip === true) {
|
|
27
|
+
return {
|
|
28
|
+
title,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
...tooltip,
|
|
33
|
+
title,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
const TagsComponent = (props: IProps) => {
|
|
37
|
+
const {
|
|
38
|
+
data,
|
|
39
|
+
closable,
|
|
40
|
+
onClose,
|
|
41
|
+
color,
|
|
42
|
+
icon,
|
|
43
|
+
fieldNames = {},
|
|
44
|
+
tooltip,
|
|
45
|
+
tableInstance,
|
|
46
|
+
maxLen,
|
|
47
|
+
} = props;
|
|
48
|
+
const { label = "label", value = "value" } = fieldNames;
|
|
49
|
+
const { tagData, moreTag } = useMemo(() => {
|
|
50
|
+
if (!maxLen || !data) {
|
|
51
|
+
return {
|
|
52
|
+
tagData: data,
|
|
53
|
+
};
|
|
27
54
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const {tagData,moreTag}=useMemo(()=>{
|
|
37
|
-
if (!maxLen||!data){
|
|
38
|
-
return {
|
|
39
|
-
tagData:data
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
const tagData=data.slice(0,maxLen);
|
|
43
|
-
const moreTag=data.slice(maxLen);
|
|
44
|
-
return {
|
|
45
|
-
tagData,
|
|
46
|
-
moreTag
|
|
47
|
-
}
|
|
48
|
-
},[data,maxLen]);
|
|
49
|
-
const moreLen=moreTag?.length;
|
|
55
|
+
const resultTagData = data.slice(0, maxLen);
|
|
56
|
+
const resultMoreTag = data.slice(maxLen);
|
|
57
|
+
return {
|
|
58
|
+
tagData: resultTagData,
|
|
59
|
+
moreTag: resultMoreTag,
|
|
60
|
+
};
|
|
61
|
+
}, [data, maxLen]);
|
|
62
|
+
const moreLen = moreTag?.length;
|
|
50
63
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
64
|
+
return (
|
|
65
|
+
<Row gutter={[8, 8]}>
|
|
66
|
+
{tagData?.map((tagItem, index) => {
|
|
67
|
+
const tagProps = {
|
|
68
|
+
closable,
|
|
69
|
+
onClose,
|
|
70
|
+
color,
|
|
71
|
+
icon,
|
|
72
|
+
};
|
|
73
|
+
const indexKey = index.toString();
|
|
74
|
+
if (typeof tagItem === "string") {
|
|
75
|
+
const tooltipProps = getTooltipProps(tagItem, tooltip);
|
|
76
|
+
return (
|
|
77
|
+
<Tooltip {...tooltipProps}>
|
|
78
|
+
<Tag
|
|
79
|
+
key={indexKey}
|
|
80
|
+
{...tagProps}
|
|
81
|
+
onClose={(e) => {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
onClose?.(indexKey, tableInstance);
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
86
|
+
{tagItem}
|
|
87
|
+
</Tag>
|
|
88
|
+
</Tooltip>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
const { [label]: tagLabel, [value]: tagValue, ...itemProps } = tagItem;
|
|
92
|
+
const tooltipProps = getTooltipProps(tagLabel, tooltip);
|
|
93
|
+
const cuTagProps = {
|
|
94
|
+
...tagProps,
|
|
95
|
+
...itemProps,
|
|
96
|
+
};
|
|
97
|
+
const cuKey = tagValue || indexKey;
|
|
98
|
+
return (
|
|
99
|
+
<Tooltip {...tooltipProps}>
|
|
100
|
+
<Tag
|
|
101
|
+
key={cuKey}
|
|
102
|
+
{...cuTagProps}
|
|
103
|
+
onClose={(e) => {
|
|
104
|
+
e.preventDefault();
|
|
105
|
+
cuTagProps?.onClose(cuKey, tableInstance);
|
|
106
|
+
}}
|
|
107
|
+
>
|
|
108
|
+
{tagLabel}
|
|
109
|
+
</Tag>
|
|
110
|
+
</Tooltip>
|
|
111
|
+
);
|
|
112
|
+
})}
|
|
113
|
+
{!moreLen ? null : (
|
|
114
|
+
<Popover content={<TagsComponent {...props} maxLen={null} />}>
|
|
115
|
+
<Tag>...等{data.length}个</Tag>
|
|
116
|
+
</Popover>
|
|
117
|
+
)}
|
|
118
|
+
</Row>
|
|
119
|
+
);
|
|
120
|
+
};
|
|
90
121
|
|
|
91
|
-
export default TagsComponent;
|
|
122
|
+
export default TagsComponent;
|
|
@@ -1,75 +1,110 @@
|
|
|
1
|
-
import moment from
|
|
2
|
-
import {ConfigItemModal, HTableInstance} from "@/components/modal";
|
|
1
|
+
import moment from "moment";
|
|
2
|
+
import type { ConfigItemModal, HTableInstance } from "@/components/modal";
|
|
3
3
|
import TagsComponent from "./TagsComponent";
|
|
4
|
-
import copy from
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
4
|
+
import copy from "copy-to-clipboard";
|
|
5
|
+
import {Image, message, Typography,Avatar} from "antd";
|
|
6
|
+
|
|
7
|
+
const { Link, Paragraph } = Typography;
|
|
8
|
+
const getTableVal = (config: ConfigItemModal, itemData: any) => {
|
|
9
|
+
const { dataIndex } = config;
|
|
10
|
+
const tableDataIndex = dataIndex as string;
|
|
11
|
+
return itemData[tableDataIndex];
|
|
12
|
+
};
|
|
13
|
+
const dateRender = (config: ConfigItemModal, itemData: any) => {
|
|
14
|
+
const { valueTypeProps = {} } = config;
|
|
15
|
+
const tableVal = getTableVal(config, itemData);
|
|
16
|
+
const { format = "YYYY-MM-DD HH:mm:ss", timeStampType = "X" } =
|
|
17
|
+
valueTypeProps;
|
|
18
|
+
if (!tableVal) {
|
|
19
|
+
return "-";
|
|
20
|
+
}
|
|
21
|
+
const time = moment(tableVal, timeStampType);
|
|
22
|
+
return time.format(format);
|
|
23
|
+
};
|
|
24
|
+
const tagsRender = (
|
|
25
|
+
config: ConfigItemModal,
|
|
26
|
+
itemData: any,
|
|
27
|
+
index: number,
|
|
28
|
+
tableInstance: HTableInstance
|
|
29
|
+
) => {
|
|
30
|
+
const { valueTypeProps = {} } = config;
|
|
31
|
+
const tableVal = getTableVal(config, itemData);
|
|
32
|
+
if (!tableVal) {
|
|
33
|
+
return "-";
|
|
34
|
+
}
|
|
35
|
+
return (
|
|
36
|
+
<TagsComponent
|
|
37
|
+
data={tableVal}
|
|
38
|
+
{...valueTypeProps}
|
|
39
|
+
tableInstance={tableInstance}
|
|
40
|
+
/>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
const copyRender = (config: ConfigItemModal, itemData: any) => {
|
|
44
|
+
const { valueTypeProps = {}, title, titleStr } = config;
|
|
45
|
+
const { successMsg, text } = valueTypeProps;
|
|
46
|
+
const msg = successMsg || `复制${title || titleStr}成功!`;
|
|
47
|
+
const tableVal = getTableVal(config, itemData);
|
|
48
|
+
if (!tableVal) {
|
|
49
|
+
return "-";
|
|
50
|
+
}
|
|
51
|
+
let cpText = text;
|
|
52
|
+
if (typeof text === "function") {
|
|
53
|
+
cpText = text(itemData);
|
|
54
|
+
}
|
|
55
|
+
return (
|
|
56
|
+
<Link
|
|
57
|
+
onClick={() => {
|
|
58
|
+
copy(cpText || tableVal);
|
|
44
59
|
message.success(msg);
|
|
45
|
-
|
|
46
|
-
|
|
60
|
+
}}
|
|
61
|
+
>
|
|
62
|
+
{tableVal}
|
|
47
63
|
</Link>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
const linkRender = (config: ConfigItemModal, itemData: any) => {
|
|
67
|
+
const { valueTypeProps = {} } = config;
|
|
68
|
+
const { href, target = "_blank" } = valueTypeProps;
|
|
69
|
+
const tableVal = getTableVal(config, itemData);
|
|
70
|
+
let hrefUrl = href;
|
|
71
|
+
if (typeof href === "function") {
|
|
72
|
+
hrefUrl = href(itemData);
|
|
73
|
+
}
|
|
74
|
+
return (
|
|
75
|
+
<Link href={hrefUrl || tableVal} target={target}>
|
|
76
|
+
{tableVal}
|
|
59
77
|
</Link>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
const textRender = (config: ConfigItemModal, itemData: any) => {
|
|
81
|
+
const { valueTypeProps = {} } = config;
|
|
82
|
+
const { addonBefore, addonAfter, type, ellipsis } = valueTypeProps;
|
|
83
|
+
const tableVal = getTableVal(config, itemData);
|
|
84
|
+
return (
|
|
85
|
+
<Paragraph type={type} ellipsis={ellipsis}>
|
|
86
|
+
{addonBefore}
|
|
87
|
+
{tableVal}
|
|
88
|
+
{addonAfter}
|
|
67
89
|
</Paragraph>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
const imageRender=(config: ConfigItemModal, itemData: any)=>{
|
|
93
|
+
const { valueTypeProps = {} } = config;
|
|
94
|
+
const tableVal = getTableVal(config, itemData);
|
|
95
|
+
return <Image src={tableVal} width={48} {...valueTypeProps}/>;
|
|
96
|
+
}
|
|
97
|
+
const avatarRender=(config: ConfigItemModal, itemData: any)=>{
|
|
98
|
+
const { valueTypeProps = {} } = config;
|
|
99
|
+
const tableVal = getTableVal(config, itemData);
|
|
100
|
+
return <Avatar src={tableVal} size={32} {...valueTypeProps}/>;
|
|
68
101
|
}
|
|
69
102
|
export default {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
103
|
+
date: dateRender,
|
|
104
|
+
tags: tagsRender,
|
|
105
|
+
copy: copyRender,
|
|
106
|
+
link: linkRender,
|
|
107
|
+
text: textRender,
|
|
108
|
+
image:imageRender,
|
|
109
|
+
avatar:avatarRender
|
|
110
|
+
};
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import { ConfigItemModal, HTableInstance} from "@/components/modal";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import config from
|
|
4
|
-
import {ValueTypeConfigModal} from
|
|
5
|
-
export default (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import type { ConfigItemModal, HTableInstance } from "@/components/modal";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import config from "./config";
|
|
4
|
+
import type { ValueTypeConfigModal } from "../modal";
|
|
5
|
+
export default (
|
|
6
|
+
item: ConfigItemModal,
|
|
7
|
+
tableInstance: HTableInstance,
|
|
8
|
+
valueTypeConfig: ValueTypeConfigModal
|
|
9
|
+
) => {
|
|
10
|
+
const { render, valueType = "" } = item;
|
|
11
|
+
return (dom: React.ReactNode, itemData: any, index: number) => {
|
|
12
|
+
const valType = valueType as string;
|
|
13
|
+
let node=dom;
|
|
14
|
+
if (config[valType]) {
|
|
15
|
+
node= config[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
|
+
};
|