@hw-component/table 1.9.27 → 1.9.28
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/es/HTableBody/RowSelection.js +6 -2
- package/es/HTableHeader/defaultSubComponent.js +1 -1
- package/lib/HTableBody/RowSelection.js +5 -1
- package/lib/HTableHeader/defaultSubComponent.js +1 -1
- package/package.json +1 -1
- package/src/components/HTableBody/RowSelection.tsx +9 -2
- package/src/components/HTableHeader/defaultSubComponent.tsx +1 -1
- package/src/pages/Table/index.tsx +0 -23
|
@@ -8,7 +8,7 @@ import _spliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/insta
|
|
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
|
9
9
|
import { useHTableContext } from '../context.js';
|
|
10
10
|
import { Dropdown, Checkbox, Menu } from 'antd';
|
|
11
|
-
import { useMemo } from 'react';
|
|
11
|
+
import { useMemo, useEffect } from 'react';
|
|
12
12
|
|
|
13
13
|
var RowSelectionTitle = function RowSelectionTitle(_ref) {
|
|
14
14
|
var _ref$allPageCheck = _ref.allPageCheck,
|
|
@@ -152,8 +152,12 @@ var RowSelectionBox = function RowSelectionBox(_ref5) {
|
|
|
152
152
|
var _ref6 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(data)) || {},
|
|
153
153
|
_ref6$disabled = _ref6.disabled,
|
|
154
154
|
disabled = _ref6$disabled === void 0 ? false : _ref6$disabled;
|
|
155
|
+
var checked = _indexOfInstanceProperty(keys).call(keys, key) !== -1;
|
|
156
|
+
useEffect(function () {
|
|
157
|
+
console.log("检测一次");
|
|
158
|
+
}, []);
|
|
155
159
|
return jsx(Checkbox, {
|
|
156
|
-
checked:
|
|
160
|
+
checked: checked,
|
|
157
161
|
onChange: check,
|
|
158
162
|
disabled: disabled
|
|
159
163
|
});
|
|
@@ -153,8 +153,12 @@ var RowSelectionBox = function RowSelectionBox(_ref5) {
|
|
|
153
153
|
var _ref6 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(data)) || {},
|
|
154
154
|
_ref6$disabled = _ref6.disabled,
|
|
155
155
|
disabled = _ref6$disabled === void 0 ? false : _ref6$disabled;
|
|
156
|
+
var checked = _indexOfInstanceProperty(keys).call(keys, key) !== -1;
|
|
157
|
+
React.useEffect(function () {
|
|
158
|
+
console.log("检测一次");
|
|
159
|
+
}, []);
|
|
156
160
|
return jsxRuntime.jsx(antd.Checkbox, {
|
|
157
|
-
checked:
|
|
161
|
+
checked: checked,
|
|
158
162
|
onChange: check,
|
|
159
163
|
disabled: disabled
|
|
160
164
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useHTableContext } from "../context";
|
|
2
2
|
import { Checkbox, Dropdown, Menu } from "antd";
|
|
3
|
-
import { useMemo
|
|
3
|
+
import {useEffect, useMemo} from "react";
|
|
4
4
|
import type { HRowSelection } from "../modal";
|
|
5
5
|
export const RowSelectionTitle = ({
|
|
6
6
|
allPageCheck = true,
|
|
@@ -137,9 +137,16 @@ export const RowSelectionBox = ({
|
|
|
137
137
|
onChange?.(newKeys, newRowData);
|
|
138
138
|
};
|
|
139
139
|
const { disabled = false } = getCheckboxProps?.(data) || {};
|
|
140
|
+
const checked=keys.indexOf(key) !== -1;
|
|
141
|
+
useEffect(() => {
|
|
142
|
+
if (checked){
|
|
143
|
+
|
|
144
|
+
}
|
|
145
|
+
console.log("检测一次")
|
|
146
|
+
}, []);
|
|
140
147
|
return (
|
|
141
148
|
<Checkbox
|
|
142
|
-
checked={
|
|
149
|
+
checked={checked}
|
|
143
150
|
onChange={check}
|
|
144
151
|
disabled={disabled}
|
|
145
152
|
/>
|
|
@@ -43,20 +43,6 @@ export const configData = [
|
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
|
-
{
|
|
47
|
-
showSearch: true,
|
|
48
|
-
searchType: "submit",
|
|
49
|
-
searchRender:(item,node,form,table)=>{
|
|
50
|
-
console.log(table)
|
|
51
|
-
return <HTableHeaderSubBtn form={form} render={([sub,reset,more])=>{
|
|
52
|
-
return <div>
|
|
53
|
-
{sub}
|
|
54
|
-
{reset}
|
|
55
|
-
{more}
|
|
56
|
-
</div>
|
|
57
|
-
}}/>
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
46
|
{
|
|
61
47
|
title: "短信接收手机号",
|
|
62
48
|
dataIndex: "mobileList",
|
|
@@ -185,19 +171,10 @@ export default () => {
|
|
|
185
171
|
searchSpan={{
|
|
186
172
|
span:24
|
|
187
173
|
}}
|
|
188
|
-
onFinish={() => {
|
|
189
|
-
console.log("fff");
|
|
190
|
-
}}
|
|
191
174
|
rowKey={(rowData, index) => {
|
|
192
175
|
return index;
|
|
193
176
|
}}
|
|
194
177
|
table={hTable}
|
|
195
|
-
loading={true}
|
|
196
|
-
onReset={() => {
|
|
197
|
-
hTable.form.setFieldsValue({
|
|
198
|
-
name1: "ffff",
|
|
199
|
-
});
|
|
200
|
-
}}
|
|
201
178
|
labelWidth={88}
|
|
202
179
|
action={{
|
|
203
180
|
test: (params) => {
|