@hw-component/table 1.9.86 → 1.9.88

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.
Files changed (41) hide show
  1. package/.eslintcache +1 -1
  2. package/es/HTableBody/Options/utils.d.ts +5 -2
  3. package/es/HTableBody/RowCheckBox/RowItem.d.ts +2 -8
  4. package/es/HTableBody/RowCheckBox/hooks.d.ts +2 -2
  5. package/es/HTableBody/RowRadioBoxSelection.d.ts +1 -8
  6. package/es/HTableBody/hooks/useRowClassName.d.ts +4 -0
  7. package/es/HTableBody/hooks/useRowClassName.js +39 -0
  8. package/es/HTableBody/index.js +8 -25
  9. package/es/HTableBody/modal.d.ts +7 -1
  10. package/es/HTableBody/utils.d.ts +1 -0
  11. package/es/HTableHeader/RangePickerSearch.d.ts +1 -1
  12. package/es/TableConfig.d.ts +2 -0
  13. package/es/TableConfig.js +4 -2
  14. package/es/modal.d.ts +2 -1
  15. package/es/render/Text.d.ts +0 -1
  16. package/lib/HTableBody/Options/utils.d.ts +5 -2
  17. package/lib/HTableBody/RowCheckBox/RowItem.d.ts +2 -8
  18. package/lib/HTableBody/RowCheckBox/hooks.d.ts +2 -2
  19. package/lib/HTableBody/RowRadioBoxSelection.d.ts +1 -8
  20. package/lib/HTableBody/hooks/useRowClassName.d.ts +4 -0
  21. package/lib/HTableBody/hooks/useRowClassName.js +42 -0
  22. package/lib/HTableBody/index.js +7 -24
  23. package/lib/HTableBody/modal.d.ts +7 -1
  24. package/lib/HTableBody/utils.d.ts +1 -0
  25. package/lib/HTableHeader/RangePickerSearch.d.ts +1 -1
  26. package/lib/TableConfig.d.ts +2 -0
  27. package/lib/TableConfig.js +4 -2
  28. package/lib/modal.d.ts +2 -1
  29. package/lib/render/Text.d.ts +0 -1
  30. package/package.json +1 -1
  31. package/src/components/HTableBody/RowCheckBox/RowItem.tsx +2 -8
  32. package/src/components/HTableBody/RowCheckBox/hooks.ts +2 -2
  33. package/src/components/HTableBody/RowRadioBoxSelection.tsx +1 -7
  34. package/src/components/HTableBody/hooks/useRowClassName.ts +33 -0
  35. package/src/components/HTableBody/index.tsx +3 -21
  36. package/src/components/HTableBody/modal.ts +8 -1
  37. package/src/components/HTableBody/utils.ts +5 -0
  38. package/src/components/TableConfig.tsx +3 -0
  39. package/src/components/hooks/useRowObj.ts +1 -1
  40. package/src/components/modal.ts +6 -1
  41. package/src/pages/Table/index.tsx +62 -60
@@ -121,38 +121,47 @@ export default () => {
121
121
  >
122
122
  获取
123
123
  </div>
124
- <HTable
125
- configData={configData}
126
- rowKey={(rowData, index) => {
127
- return index;
128
- }}
129
- table={hTable}
130
- labelWidth={88}
131
- action={{
132
- test: (params) => {
133
- console.log(params, "lllll");
134
- },
135
- }}
136
- rowSelection={{
137
- preserveSelectedRowKeys: true,
138
- }}
139
- affixProps={{
140
- target: () => document.querySelector(".body"),
141
- }}
142
- scroll={{
143
- x: 1000,
144
- }}
145
- columnsState={{
146
- persistenceKey: "test",
147
- persistenceType: "localStorage",
148
- }}
149
- formInitValues={{
150
- deviceType: "1",
151
- }}
152
- dataSource={[{}, {}, {}]}
153
- headerTitle={
154
- <Space size={8}>
155
- <div style={{ width: 1000 }}>
124
+ <HTableConfig defaultSelectedRowClassName={null}>
125
+ <HTable
126
+ configData={configData}
127
+ rowKey={(rowData, index) => {
128
+ return index;
129
+ }}
130
+ table={hTable}
131
+ labelWidth={88}
132
+ action={{
133
+ test: (params) => {
134
+ console.log(params, "lllll");
135
+ },
136
+ }}
137
+ rowSelection={{
138
+ preserveSelectedRowKeys: true,
139
+ }}
140
+ affixProps={{
141
+ target: () => document.querySelector(".body"),
142
+ }}
143
+ scroll={{
144
+ x: 1000,
145
+ }}
146
+ columnsState={{
147
+ persistenceKey: "test",
148
+ persistenceType: "localStorage",
149
+ }}
150
+ formInitValues={{
151
+ deviceType: "1",
152
+ }}
153
+ dataSource={[{}, {}, {}]}
154
+ headerTitle={
155
+ <Space size={8}>
156
+ <div style={{ width: 1000 }}>
157
+ <Button
158
+ onClick={() => {
159
+ console.log(hTable.table.getColSettingKeys());
160
+ }}
161
+ >
162
+ 操作
163
+ </Button>
164
+ </div>
156
165
  <Button
157
166
  onClick={() => {
158
167
  console.log(hTable.table.getColSettingKeys());
@@ -160,34 +169,27 @@ export default () => {
160
169
  >
161
170
  操作
162
171
  </Button>
163
- </div>
164
- <Button
165
- onClick={() => {
166
- console.log(hTable.table.getColSettingKeys());
167
- }}
168
- >
169
- 操作
170
- </Button>
171
- <Button
172
- onClick={() => {
173
- console.log(hTable.table.getColSettingKeys());
174
- }}
175
- >
176
- 操作
177
- </Button>
178
- </Space>
179
- }
180
- options={{
181
- settingRender: () => {
182
- return (
183
- <Tooltip title="321312312312321">
184
- <SettingOutlined width={24} />
185
- </Tooltip>
186
- );
187
- },
188
- }}
189
- pagination={false}
190
- />
172
+ <Button
173
+ onClick={() => {
174
+ console.log(hTable.table.getColSettingKeys());
175
+ }}
176
+ >
177
+ 操作
178
+ </Button>
179
+ </Space>
180
+ }
181
+ options={{
182
+ settingRender: () => {
183
+ return (
184
+ <Tooltip title="321312312312321">
185
+ <SettingOutlined width={24} />
186
+ </Tooltip>
187
+ );
188
+ },
189
+ }}
190
+ pagination={false}
191
+ />
192
+ </HTableConfig>
191
193
  </div>
192
194
  </HFormConfigProvider>
193
195
  );