@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.
@@ -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: _indexOfInstanceProperty(keys).call(keys, key) !== -1,
160
+ checked: checked,
157
161
  onChange: check,
158
162
  disabled: disabled
159
163
  });
@@ -80,7 +80,7 @@ var DefaultSubComponent = function DefaultSubComponent(_ref) {
80
80
  onReset();
81
81
  return;
82
82
  }
83
- form.resetFields();
83
+ form.resetFieldsInitValue();
84
84
  },
85
85
  children: "\u91CD\u7F6E"
86
86
  });
@@ -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: _indexOfInstanceProperty(keys).call(keys, key) !== -1,
161
+ checked: checked,
158
162
  onChange: check,
159
163
  disabled: disabled
160
164
  });
@@ -81,7 +81,7 @@ var DefaultSubComponent = function DefaultSubComponent(_ref) {
81
81
  onReset();
82
82
  return;
83
83
  }
84
- form.resetFields();
84
+ form.resetFieldsInitValue();
85
85
  },
86
86
  children: "\u91CD\u7F6E"
87
87
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/table",
3
- "version": "1.9.27",
3
+ "version": "1.9.28",
4
4
  "description": "基于antd二次开发table组件",
5
5
  "keywords": [
6
6
  "table"
@@ -1,6 +1,6 @@
1
1
  import { useHTableContext } from "../context";
2
2
  import { Checkbox, Dropdown, Menu } from "antd";
3
- import { useMemo } from "react";
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={keys.indexOf(key) !== -1}
149
+ checked={checked}
143
150
  onChange={check}
144
151
  disabled={disabled}
145
152
  />
@@ -70,7 +70,7 @@ export const DefaultSubComponent = ({ form ,render}: IProps) => {
70
70
  onReset();
71
71
  return;
72
72
  }
73
- form.resetFields();
73
+ form.resetFieldsInitValue();
74
74
  }}
75
75
  >
76
76
  重置
@@ -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) => {