@hw-component/table 1.10.11 → 1.10.13

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.
@@ -1,113 +1,115 @@
1
1
  @import "./styles/local.less";
2
- .@{ant-prefix}-hw-table-content{
3
- .@{ant-prefix}-hw-table-body{
4
- padding-top: 0px;
5
- border-top-left-radius: 0px;
6
- border-top-right-radius: 0px;
2
+ .@{ant-prefix}-hw-table-content {
3
+ .@{ant-prefix}-hw-table-body {
4
+ padding-top: 0;
5
+ border-top-left-radius: 0;
6
+ border-top-right-radius: 0;
7
7
  }
8
- .@{ant-prefix}-hw-table-header{
9
- border-bottom-left-radius: 0px !important;
10
- border-bottom-right-radius: 0px !important;
8
+ .@{ant-prefix}-hw-table-header {
9
+ border-bottom-right-radius: 0 !important;
10
+ border-bottom-left-radius: 0 !important;
11
11
  }
12
12
  }
13
13
  .@{ant-prefix}-hw-table-body {
14
- background-color: #fff;
15
14
  position: relative;
15
+ padding-top: 16px;
16
16
  padding-right: 20px;
17
17
  padding-left: 20px;
18
- padding-top: 16px;
18
+ background-color: #fff;
19
19
  border-radius: 4px;
20
- .@{ant-prefix}-hw-table-pagination{
20
+ .@{ant-prefix}-hw-table-pagination {
21
+ margin-right: -20px;
22
+ margin-left: -20px;
21
23
  padding: 12px 24px;
22
- background-color:#ffffff;
23
- border-bottom-left-radius: 4px;
24
+ background-color: #fff;
24
25
  border-bottom-right-radius: 4px;
25
- margin-left: -20px;
26
- margin-right: -20px;
27
- .@{ant-prefix}-select{
26
+ border-bottom-left-radius: 4px;
27
+ .@{ant-prefix}-select {
28
28
  width: auto;
29
29
  }
30
30
  }
31
- .@{ant-prefix}-pro-card-body{
32
- padding-bottom: 0px;
31
+ .@{ant-prefix}-pro-card-body {
32
+ padding-bottom: 0;
33
33
  }
34
- .@{ant-prefix}-pro-table-list-toolbar-container{
35
- padding-top: 0px;
34
+ .@{ant-prefix}-pro-table-list-toolbar-container {
35
+ padding-top: 0;
36
36
  }
37
- .@{ant-prefix}-pro-table>.@{ant-prefix}-pro-card>.@{ant-prefix}-pro-card-body{
38
- padding: 0px;
37
+ .@{ant-prefix}-pro-table
38
+ > .@{ant-prefix}-pro-card
39
+ > .@{ant-prefix}-pro-card-body {
40
+ padding: 0;
39
41
  }
40
42
  }
41
- .@{ant-prefix}-hw-table-pagination{
43
+ .@{ant-prefix}-hw-table-pagination {
44
+ position: relative;
42
45
  padding: 12px 24px;
43
- border-radius: 4px;
44
- background-color: #ffffff;
45
- position: relative;
46
+ background-color: #fff;
47
+ border-radius: 4px;
46
48
  }
47
49
 
48
- .@{ant-prefix}-hw-top-btn{
49
- position: absolute;
50
- right: 10px;
51
- bottom: 54px;
52
- z-index: 9;
53
- cursor: pointer;
54
- width: 48px;
55
- height: 48px;
56
- background: url("./GoTop/goTop.png") no-repeat;
57
- background-size: 100%;
58
- }
59
- .@{ant-prefix}-hw-table-header{
50
+ .@{ant-prefix}-hw-top-btn {
51
+ position: absolute;
52
+ right: 10px;
53
+ bottom: 54px;
54
+ z-index: 9;
55
+ width: 48px;
56
+ height: 48px;
57
+ background: url("./GoTop/goTop.png") no-repeat;
58
+ background-size: 100%;
59
+ cursor: pointer;
60
+ }
61
+ .@{ant-prefix}-hw-table-header {
62
+ padding-bottom: 0;
60
63
  border-radius: 4px !important;
61
- padding-bottom: 0px;
62
- .@{ant-prefix}-hw-table-header-item-hide{
64
+ .@{ant-prefix}-hw-table-header-item-hide {
63
65
  display: none;
64
66
  }
65
- .@{ant-prefix}-card-body{
66
- padding:24px 20px
67
+ .@{ant-prefix}-card-body {
68
+ padding: 24px 20px;
67
69
  }
68
- .@{ant-prefix}-form-item{
69
- margin-bottom: 16px;
70
+ .@{ant-prefix}-form-item {
71
+ margin-bottom: 16px;
70
72
  }
71
73
  }
72
74
 
73
- .@{ant-prefix}-hw-table-body-option-icon{
74
- font-size: 16px;
75
+ .@{ant-prefix}-hw-table-body-option-icon {
76
+ font-size: 16px;
75
77
  }
76
- .@{ant-prefix}-hw-table-body-option-setting-content{
78
+ .@{ant-prefix}-hw-table-body-option-setting-content {
77
79
  width: 198px;
78
80
  margin: -10px -16px;
79
81
  }
80
- .@{ant-prefix}-hw-table-body-option-setting-title{
82
+ .@{ant-prefix}-hw-table-body-option-setting-title {
81
83
  width: 198px;
82
- margin: 0px -16px;
84
+ margin: 0 -16px;
83
85
  padding: 6px 8px;
84
86
  }
85
- .@{ant-prefix}-hw-table-body-option-setting-content-title{
87
+ .@{ant-prefix}-hw-table-body-option-setting-content-title {
86
88
  display: flex;
87
89
  }
88
- .@{ant-prefix}-hw-table-op-tree-content{
89
- padding: 6px 6px 6px 0px;
90
+ .@{ant-prefix}-hw-table-op-tree-content {
90
91
  width: 100%;
92
+ padding: 6px 6px 6px 0;
91
93
  }
92
- .@{ant-prefix}-hw-table-body-option-tree{
93
- .@{ant-prefix}-tree-treenode{
94
- width: 100%;
94
+ .@{ant-prefix}-hw-table-body-option-tree {
95
+ .@{ant-prefix}-tree-treenode {
96
+ width: 100%;
95
97
  padding-left: 24px !important;
96
98
  }
97
- .@{ant-prefix}-tree-node-content-wrapper{
99
+ .@{ant-prefix}-tree-node-content-wrapper {
98
100
  flex: 1;
99
101
  }
100
- .@{ant-prefix}-tree-switcher{
101
- width: 0px;
102
+ .@{ant-prefix}-tree-switcher {
103
+ width: 0;
102
104
  }
103
- .@{ant-prefix}-tree-treenode-draggable{
104
- padding-left: 0px !important;
105
+ .@{ant-prefix}-tree-treenode-draggable {
106
+ padding-left: 0 !important;
105
107
  }
106
108
  }
107
- .@{ant-prefix}-hw-table-pointer{
109
+ .@{ant-prefix}-hw-table-pointer {
108
110
  cursor: pointer;
109
- &:hover{
110
- color:#1890ff;
111
+ &:hover {
112
+ color: #1890ff;
111
113
  }
112
114
  }
113
115
  .@{ant-prefix}-hw-table-pointer-not-hover {
@@ -115,49 +117,47 @@
115
117
  }
116
118
 
117
119
  .@{ant-prefix}-hw-table-header-title-box {
118
- flex: 1;
119
- display: flex;
120
120
  position: relative;
121
+ display: flex;
122
+ flex: 1;
121
123
  box-sizing: border-box;
122
- margin: -10px 0px;
123
- padding: 10px 0px;
124
- .@{ant-prefix}-hw-table-header-title-box-content {
124
+ margin: -10px 0;
125
+ padding: 10px 0;
126
+ .@{ant-prefix}-hw-table-header-title-box-content {
125
127
  white-space: nowrap;
126
- }
128
+ }
127
129
  }
128
- .@{ant-prefix}-hw-table-header-title{
130
+ .@{ant-prefix}-hw-table-header-title {
129
131
  display: flex;
130
- justify-content: space-between;
131
132
  align-content: center;
133
+ justify-content: space-between;
132
134
  }
133
- .@{ant-prefix}-hw-table-header-right-node{
134
- padding-left: 12px;
135
+ .@{ant-prefix}-hw-table-header-right-node {
135
136
  display: flex;
136
137
  align-items: center;
138
+ padding-left: 12px;
137
139
  }
138
140
 
139
- .@{ant-prefix}-hw-table-render-copy{
140
- margin-bottom: 0 !important;
141
- color:@primary-color !important;
142
- cursor: pointer;
141
+ .@{ant-prefix}-hw-table-render-copy {
142
+ margin-bottom: 0 !important;
143
+ color: @primary-color !important;
144
+ cursor: pointer;
143
145
  }
144
146
 
145
- .@{ant-prefix}-hw-table-render-text-basic{
147
+ .@{ant-prefix}-hw-table-render-text-basic {
146
148
  width: 100%;
147
149
  }
148
150
 
149
- .@{ant-prefix}-hw-table-col-hr{
150
- &:after{
151
+ .@{ant-prefix}-hw-table-col-hr {
152
+ &::after {
151
153
  position: absolute;
152
- top: 50%;
153
- left: 0;
154
- width: 1px;
154
+ top: 50% !important;
155
+ left: 0 !important;
156
+ width: 1px !important;
155
157
  height: 1.6em;
156
158
  background-color: rgba(0, 0, 0, 0.06);
157
- transform: translateY(-50%);
159
+ transform: translateY(-50%) !important;
158
160
  transition: background-color 0.3s;
159
- content: '';
161
+ content: "";
160
162
  }
161
163
  }
162
-
163
-
@@ -30,7 +30,7 @@ export interface ParamsModal extends Record<string, any> {
30
30
  size?: number;
31
31
  current?: number;
32
32
  }
33
- interface HColumns extends Omit<ProColumns, "render" | "title"> {
33
+ interface HColumns extends Omit<ProColumns, "render" | "title" | "children"> {
34
34
  render?: (
35
35
  dom: React.ReactNode,
36
36
  data: any,
@@ -48,6 +48,7 @@ interface HColumns extends Omit<ProColumns, "render" | "title"> {
48
48
  rowSelectionTitle?: boolean;
49
49
  title?: string | React.ReactNode;
50
50
  valueTypeProps?: Record<string, any>;
51
+ children?: ConfigItemModal[];
51
52
  }
52
53
  interface BcItemModal {
53
54
  childrenDataIndex?: ConfigItemModal[] | string[];
@@ -167,8 +167,8 @@ export default () => {
167
167
  </Button>
168
168
  <HDwTable
169
169
  dialogTable={dialogTable}
170
- request={(value)=>{
171
- console.log(value)
170
+ request={(value) => {
171
+ console.log(value);
172
172
  }}
173
173
  width={1200}
174
174
  configData={configData}
@@ -7,67 +7,60 @@ const dataSource = [
7
7
  id: 1,
8
8
  title: "1",
9
9
  time: "1757574280",
10
- },
11
- {
12
- id: 2,
13
- title: "2",
14
- },
15
- {
16
- id: 3,
17
- title: "3",
18
- },
19
- {
20
- id: 4,
21
- title: "4",
22
- },
23
- {
24
- id: 5,
25
- title: "5",
26
- },
10
+ }
27
11
  ];
28
12
  export default () => {
29
13
  const defaultActionRef = useRef<ActionType>();
30
14
  const [cuData, setCuData] = useState(dataSource);
15
+ console.log(defaultActionRef,"defaultActionRef")
31
16
  return (
32
- <HEditTable
33
- actionRef={defaultActionRef}
34
- onAdd={async (data) => {
35
- const newData = [...cuData];
36
- }}
37
- onEdit={async (data) => {}}
38
- request={async () => {
39
- return {
40
- records: [
41
- {
42
- id: "213213",
43
- title: "100",
44
- },
45
- ],
46
- current: "1",
47
- size: "10",
48
- total: "10",
49
- };
50
- }}
51
- configData={[
52
- { title: "标题", dataIndex: "title" },
53
- { title: "标题2", dataIndex: "time", valueType: "date" },
54
- {
55
- title: "操作",
56
- valueType: "option",
57
- align: "center",
58
- render: (text: any, record: any, _: any, action: any) => [
59
- <a
60
- key="editable"
61
- type={"link"}
62
- onClick={() => {
63
- action?.startEditable?.(record.id);
64
- }}
65
- >
66
- 编辑
67
- </a>,
68
- ],
69
- },
70
- ]}
71
- />
17
+ <div>
18
+ <div onClick={()=>{
19
+ defaultActionRef.current?.reload();
20
+ }}>刷新</div>
21
+ <HEditTable
22
+ actionRef={defaultActionRef}
23
+ manual
24
+ onAdd={async (data) => {
25
+ const newData = [...cuData];
26
+ newData.push({
27
+ id:new Date().valueOf(),
28
+ ...data
29
+ });
30
+ setCuData(newData);
31
+ }}
32
+ onEdit={async (data) => {}}
33
+ request={()=>{
34
+ console.log("rrrrr")
35
+ return {
36
+ records:[{
37
+ id: 1,
38
+ title: "1",
39
+ time: "1757574280",
40
+ }]
41
+ }
42
+ }}
43
+ configData={[
44
+ { title: "标题", dataIndex: "title" },
45
+ { title: "标题2", dataIndex: "time", valueType: "date" },
46
+ {
47
+ title: "操作",
48
+ valueType: "option",
49
+ align: "center",
50
+ render: (text: any, record: any, index: any, action: any) => [
51
+ <a
52
+ key="editable"
53
+ type={"link"}
54
+ onClick={() => {
55
+ action?.startEditable?.(record.id);
56
+ }}
57
+ >
58
+ 编辑
59
+ </a>
60
+ ],
61
+ },
62
+ ]}
63
+ />
64
+ </div>
72
65
  );
73
66
  };
@@ -59,7 +59,6 @@ export const configData = [
59
59
  title: "短信接收手机号",
60
60
  dataIndex: "mobileList",
61
61
  width: 120,
62
- valueType: "tags",
63
62
  searchType: "rangePicker",
64
63
  showSearch: true,
65
64
  shouldUpdate: (p, c) => {
@@ -67,20 +66,9 @@ export const configData = [
67
66
  },
68
67
  },
69
68
  {
70
- title: "图片",
69
+ title: "321312",
71
70
  dataIndex: "img",
72
71
  width: 120,
73
- valueType: "image",
74
- },
75
- {
76
- title: "图片123",
77
- dataIndex: "img123",
78
- width: 120,
79
- valueType: "image",
80
- valueTypeProps: {
81
- fallback:
82
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIz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VdowHtjt9Nnvf7yQM2aZU/TIAIAxrw6dOnAWtZZcoEnBpNuTuObWMEiLAx1HY0ZQJEmHJ3HNvGCBBhY6jtaMoEiJB0Z29vL6ls58vxPcO8/zfrdo5qvKO+d3Fx8Wu8zf1dW4p/cPzLly/dtv9Ts/EbcvGAHhHyfBIhZ6NSiIBTo0LNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==",
83
- },
84
72
  },
85
73
  {
86
74
  title: "操作",
@@ -214,6 +202,7 @@ export default () => {
214
202
  for (let i = 0; i < 10; i += 1) {
215
203
  records.push({
216
204
  id: `${current}-${i}`,
205
+ lastPullGroupTime: 1760420231,
217
206
  });
218
207
  }
219
208
  console.log(records);