@hw-component/table 1.2.5 → 1.2.7

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.
@@ -35,17 +35,76 @@ const configData = [
35
35
  itemProps: {
36
36
  options: [{ label: "1", value: 1 }],
37
37
  },
38
+ valueType:"date"
38
39
  },
39
40
  {
40
41
  title: <div>座位fff</div>,
41
42
  titleStr: "座位",
42
43
  dataIndex: "name2",
43
44
  searchType: "select",
44
- sorter: true,
45
45
  itemProps: {
46
46
  options: [{ label: "name2", value: 1 }],
47
47
  },
48
48
  },
49
+ {
50
+ title: <div>标签</div>,
51
+ dataIndex: "tag",
52
+ sorter: true,
53
+ valueType:"tags",
54
+ width: 200,
55
+ valueTypeProps:{
56
+ closable:true,
57
+ tooltip:true,
58
+ onClose:(key)=>{
59
+ console.log(key)
60
+ },
61
+ maxLen:2
62
+ }
63
+ },
64
+ {
65
+ title:"可以复制",
66
+ dataIndex: "copy",
67
+ sorter: true,
68
+ valueType:"copy",
69
+ width: 200,
70
+ valueTypeProps:{
71
+ text:()=>{
72
+ return "你大爷"
73
+ }
74
+ }
75
+ },
76
+ {
77
+ title:"link",
78
+ dataIndex: "link",
79
+ sorter: true,
80
+ valueType:"link",
81
+ width: 200,
82
+ valueTypeProps:{
83
+ href:()=>{
84
+ return "https://ant-design.antgroup.com/docs/react/i18n-cn"
85
+ }
86
+ }
87
+ },
88
+ {
89
+ title:"text",
90
+ dataIndex: "text",
91
+ sorter: true,
92
+ valueType:"text",
93
+ width: 80,
94
+ valueTypeProps:{
95
+ type:"secondary",
96
+ ellipsis:{
97
+ tooltip:true
98
+ }
99
+ }
100
+ },
101
+ {
102
+ title:"userInfo",
103
+ dataIndex: "userInfo",
104
+ sorter: true,
105
+ valueType:"userInfo",
106
+ width: 80,
107
+ },
49
108
  {
50
109
  title: "操作",
51
110
  name: "aaa",
@@ -74,7 +133,13 @@ export default () => {
74
133
  >
75
134
  获取
76
135
  </div>
77
- <HTableConfig>
136
+ <HTableConfig
137
+ valueTypeConfig={{
138
+ "userInfo":()=>{
139
+ return <div>userInfo</div>
140
+ }
141
+ }}
142
+ >
78
143
  <HTable
79
144
  configData={configData}
80
145
  rowKey={(data,index)=>{
@@ -129,6 +194,11 @@ export default () => {
129
194
  arrayData.push({
130
195
  id: i,
131
196
  name: "11",
197
+ name1:"1721730221",
198
+ tag:[{value:"1",label:"你好"},{value:"2",label:"你好1"},{value:"3",label:"你好2"}],
199
+ copy:"复制",
200
+ link:"https://www.baidu.com/",
201
+ text:"文本文本文本文本"
132
202
  });
133
203
  }
134
204
  return new Promise((resolve, reject) => {