@hw-component/table 1.10.12 → 1.10.15

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,77 +1,79 @@
1
1
  @import "./styles/local.less";
2
2
  .@{ant-prefix}-hw-table-content {
3
3
  .@{ant-prefix}-hw-table-body {
4
- padding-top: 0px;
5
- border-top-left-radius: 0px;
6
- border-top-right-radius: 0px;
4
+ padding-top: 0;
5
+ border-top-left-radius: 0;
6
+ border-top-right-radius: 0;
7
7
  }
8
8
  .@{ant-prefix}-hw-table-header {
9
- border-bottom-left-radius: 0px !important;
10
- border-bottom-right-radius: 0px !important;
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
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
31
  .@{ant-prefix}-pro-card-body {
32
- padding-bottom: 0;
32
+ padding-bottom: 0;
33
33
  }
34
34
  .@{ant-prefix}-pro-table-list-toolbar-container {
35
- padding-top: 0;
35
+ padding-top: 0;
36
36
  }
37
- .@{ant-prefix}-pro-table>.@{ant-prefix}-pro-card>.@{ant-prefix}-pro-card-body {
38
- padding: 0;
37
+ .@{ant-prefix}-pro-table
38
+ > .@{ant-prefix}-pro-card
39
+ > .@{ant-prefix}-pro-card-body {
40
+ padding: 0;
39
41
  }
40
42
  }
41
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
50
  .@{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%;
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;
58
60
  }
59
61
  .@{ant-prefix}-hw-table-header {
60
- border-radius: 4px !important;
61
62
  padding-bottom: 0;
63
+ border-radius: 4px !important;
62
64
  .@{ant-prefix}-hw-table-header-item-hide {
63
65
  display: none;
64
66
  }
65
67
  .@{ant-prefix}-card-body {
66
- padding:24px 20px
68
+ padding: 24px 20px;
67
69
  }
68
70
  .@{ant-prefix}-form-item {
69
- margin-bottom: 16px;
71
+ margin-bottom: 16px;
70
72
  }
71
73
  }
72
74
 
73
75
  .@{ant-prefix}-hw-table-body-option-icon {
74
- font-size: 16px;
76
+ font-size: 16px;
75
77
  }
76
78
  .@{ant-prefix}-hw-table-body-option-setting-content {
77
79
  width: 198px;
@@ -79,19 +81,19 @@
79
81
  }
80
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
87
  .@{ant-prefix}-hw-table-body-option-setting-content-title {
86
88
  display: flex;
87
89
  }
88
90
  .@{ant-prefix}-hw-table-op-tree-content {
89
- padding: 6px 6px 6px 0;
90
91
  width: 100%;
92
+ padding: 6px 6px 6px 0;
91
93
  }
92
94
  .@{ant-prefix}-hw-table-body-option-tree {
93
- .@{ant-prefix}-tree-treenode{
94
- width: 100%;
95
+ .@{ant-prefix}-tree-treenode {
96
+ width: 100%;
95
97
  padding-left: 24px !important;
96
98
  }
97
99
  .@{ant-prefix}-tree-node-content-wrapper {
@@ -101,13 +103,13 @@
101
103
  width: 0;
102
104
  }
103
105
  .@{ant-prefix}-tree-treenode-draggable {
104
- padding-left: 0 !important;
106
+ padding-left: 0 !important;
105
107
  }
106
108
  }
107
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,31 +117,31 @@
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
124
  margin: -10px 0;
123
125
  padding: 10px 0;
124
- .@{ant-prefix}-hw-table-header-title-box-content {
126
+ .@{ant-prefix}-hw-table-header-title-box-content {
125
127
  white-space: nowrap;
126
- }
128
+ }
127
129
  }
128
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
135
  .@{ant-prefix}-hw-table-header-right-node {
134
- padding-left: 12px;
135
136
  display: flex;
136
137
  align-items: center;
138
+ padding-left: 12px;
137
139
  }
138
140
 
139
141
  .@{ant-prefix}-hw-table-render-copy {
140
- margin-bottom: 0 !important;
141
- color:@primary-color !important;
142
- cursor: pointer;
142
+ margin-bottom: 0 !important;
143
+ color: @primary-color !important;
144
+ cursor: pointer;
143
145
  }
144
146
 
145
147
  .@{ant-prefix}-hw-table-render-text-basic {
@@ -147,7 +149,7 @@
147
149
  }
148
150
 
149
151
  .@{ant-prefix}-hw-table-col-hr {
150
- &:after {
152
+ &::after {
151
153
  position: absolute;
152
154
  top: 50% !important;
153
155
  left: 0 !important;
@@ -156,8 +158,6 @@
156
158
  background-color: rgba(0, 0, 0, 0.06);
157
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"|"children"> {
33
+ interface HColumns extends Omit<ProColumns, "render" | "title" | "children"> {
34
34
  render?: (
35
35
  dom: React.ReactNode,
36
36
  data: any,
@@ -48,7 +48,7 @@ interface HColumns extends Omit<ProColumns, "render" | "title"|"children"> {
48
48
  rowSelectionTitle?: boolean;
49
49
  title?: string | React.ReactNode;
50
50
  valueTypeProps?: Record<string, any>;
51
- children?:ConfigItemModal[]
51
+ children?: ConfigItemModal[];
52
52
  }
53
53
  interface BcItemModal {
54
54
  childrenDataIndex?: ConfigItemModal[] | string[];
@@ -8,66 +8,63 @@ const dataSource = [
8
8
  title: "1",
9
9
  time: "1757574280",
10
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
- },
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
19
+ onClick={() => {
20
+
21
+ }}
22
+ >
23
+ 刷新
24
+ </div>
25
+ <HEditTable
26
+ manual
27
+ onAdd={async (data) => {
28
+ const newData = [...cuData];
29
+ newData.push({
30
+ id: new Date().valueOf(),
31
+ ...data,
32
+ });
33
+ setCuData(newData);
34
+ }}
35
+ onEdit={async (data) => {}}
36
+ request={() => {
37
+ return {
38
+ records: [
39
+ {
40
+ id: 1,
41
+ title: "1",
42
+ time: "1757574280",
43
+ },
44
+ ],
45
+ };
46
+ }}
47
+ configData={[
48
+ { title: "标题", dataIndex: "title" },
49
+ { title: "标题2", dataIndex: "time", valueType: "date" },
50
+ {
51
+ title: "操作",
52
+ valueType: "option",
53
+ align: "center",
54
+ render: (text: any, record: any, index: any, action: any) => [
55
+ <a
56
+ key="editable"
57
+ type={"link"}
58
+ onClick={() => {
59
+ action?.startEditable?.(record.id);
60
+ }}
61
+ >
62
+ 编辑
63
+ </a>,
64
+ ],
65
+ },
66
+ ]}
67
+ />
68
+ </div>
72
69
  );
73
70
  };
@@ -126,7 +126,7 @@ export default () => {
126
126
  "SEC1603b7a13fec76f6ec9e1eedbd44279f61b4298142d42616a4a672c245a37f3d",
127
127
  },
128
128
  ],
129
- notifyAll: 0
129
+ notifyAll: 0,
130
130
  });
131
131
  }
132
132
  return new Promise((resolve, reject) => {
@@ -202,7 +202,7 @@ export default () => {
202
202
  for (let i = 0; i < 10; i += 1) {
203
203
  records.push({
204
204
  id: `${current}-${i}`,
205
- lastPullGroupTime:1760420231
205
+ lastPullGroupTime: 1760420231,
206
206
  });
207
207
  }
208
208
  console.log(records);