@hw-component/table 1.10.3 → 1.10.5
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/package.json +1 -1
- package/src/pages/Table/index.tsx +6 -22
package/package.json
CHANGED
|
@@ -20,29 +20,8 @@ import { SettingOutlined } from "@ant-design/icons";
|
|
|
20
20
|
import ProTable from "@ant-design/pro-table";
|
|
21
21
|
import { useRequest } from "ahooks";
|
|
22
22
|
import { useEffect, useState } from "react";
|
|
23
|
+
import TagsComponent from "@/components/render/TagsComponent";
|
|
23
24
|
|
|
24
|
-
const TagsComponent = ({ data, labelKey }) => {
|
|
25
|
-
const len = data?.length;
|
|
26
|
-
if (!len) {
|
|
27
|
-
return <>-</>;
|
|
28
|
-
}
|
|
29
|
-
return (
|
|
30
|
-
<>
|
|
31
|
-
{data?.map((item, index) => {
|
|
32
|
-
const label =
|
|
33
|
-
"483607ad55fc115ae45219f661248a42b6c40a487f95469b39ee49420a2dc";
|
|
34
|
-
console.log(label.length);
|
|
35
|
-
return (
|
|
36
|
-
<Tag key={index} style={{ width: 120 }}>
|
|
37
|
-
<Typography.Text ellipsis copyable>
|
|
38
|
-
{label}
|
|
39
|
-
</Typography.Text>
|
|
40
|
-
</Tag>
|
|
41
|
-
);
|
|
42
|
-
})}
|
|
43
|
-
</>
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
25
|
const Testd = (props) => {
|
|
47
26
|
return (
|
|
48
27
|
<div>
|
|
@@ -178,6 +157,11 @@ export default () => {
|
|
|
178
157
|
const [keys, setKeys] = useState([]);
|
|
179
158
|
return (
|
|
180
159
|
<HFormConfigProvider>
|
|
160
|
+
<TagsComponent data={["213123"]} tooltip={()=>{
|
|
161
|
+
return {
|
|
162
|
+
title:"3123"
|
|
163
|
+
}
|
|
164
|
+
}}/>
|
|
181
165
|
<div>
|
|
182
166
|
<div
|
|
183
167
|
onClick={() => {
|