@hzab/list-render 1.12.1 → 1.12.2
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/card-render/index.jsx +20 -16
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useEffect, useState, useMemo, useCallback, useRef } from "react";
|
|
2
|
-
import { Table, Button, Popconfirm, Tooltip, Checkbox, Popover, Spin } from "antd";
|
|
2
|
+
import { Table, Button, Popconfirm, Tooltip, Checkbox, Popover, Spin, Empty } from "antd";
|
|
3
3
|
import { QuestionCircleOutlined, FilterOutlined, SettingOutlined } from "@ant-design/icons";
|
|
4
4
|
import _ from "lodash";
|
|
5
5
|
import DetailRender from "@hzab/schema-descriptions";
|
|
6
6
|
import { removeInTableFalseFields } from "../common/utils";
|
|
7
7
|
import "./index.less";
|
|
8
|
-
import { use } from "react";
|
|
9
8
|
|
|
10
9
|
const scenario = "table-render";
|
|
11
10
|
|
|
@@ -105,20 +104,25 @@ function CardRender(props) {
|
|
|
105
104
|
|
|
106
105
|
return (
|
|
107
106
|
<Spin spinning={loading}>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<div className="item-render-card
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
107
|
+
{
|
|
108
|
+
props.list?.length > 0 ?
|
|
109
|
+
<div className="card-render-wrap" style={{ gridTemplateColumns: `repeat(${columns}, 1fr` }}>
|
|
110
|
+
{props.list?.map((item, index) => {
|
|
111
|
+
return (
|
|
112
|
+
<div key={item["id"]} className="item-render-card">
|
|
113
|
+
{props.hasAction !== false ? (
|
|
114
|
+
<div className="item-render-card-title">{getColRender(item, index)}</div>
|
|
115
|
+
) : null}
|
|
116
|
+
<div className="item-render-card-content">
|
|
117
|
+
<ItemRender item={item} index={index} />
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
);
|
|
121
|
+
})}
|
|
122
|
+
</div> : <Empty image={Empty.PRESENTED_IMAGE_SIMPLE}></Empty>
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
122
126
|
</Spin>
|
|
123
127
|
|
|
124
128
|
);
|