@hw-component/table 0.0.5-beta-v7 → 0.0.5-beta-v9

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.
@@ -26,7 +26,7 @@ var RowSelectionTitle = function RowSelectionTitle(_ref) {
26
26
  _ref2$records = _ref2.records,
27
27
  records = _ref2$records === void 0 ? [] : _ref2$records;
28
28
  var newData = records === null || records === void 0 ? void 0 : _filterInstanceProperty(records).call(records, function (item) {
29
- var _ref3 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(data)) || {},
29
+ var _ref3 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(item)) || {},
30
30
  _ref3$disabled = _ref3.disabled,
31
31
  disabled = _ref3$disabled === void 0 ? false : _ref3$disabled;
32
32
  return !disabled;
@@ -32,7 +32,7 @@ var defaultRender = function defaultRender() {
32
32
  var contentStyle = {
33
33
  paddingLeft: 24,
34
34
  paddingRight: 24,
35
- marginBottom: 16
35
+ paddingBottom: 16
36
36
  };
37
37
  var Body = (function (_ref) {
38
38
  var configData = _ref.configData,
package/es/index.css CHANGED
@@ -2,7 +2,6 @@
2
2
  border-bottom-left-radius: 4px;
3
3
  border-bottom-right-radius: 4px;
4
4
  background-color: #fff;
5
- overflow: hidden;
6
5
  position: relative;
7
6
  }
8
7
  .ant-hw-table-body .ant-hw-table-pagination {
@@ -27,7 +27,7 @@ var RowSelectionTitle = function RowSelectionTitle(_ref) {
27
27
  _ref2$records = _ref2.records,
28
28
  records = _ref2$records === void 0 ? [] : _ref2$records;
29
29
  var newData = records === null || records === void 0 ? void 0 : _filterInstanceProperty(records).call(records, function (item) {
30
- var _ref3 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(data)) || {},
30
+ var _ref3 = (getCheckboxProps === null || getCheckboxProps === void 0 ? void 0 : getCheckboxProps(item)) || {},
31
31
  _ref3$disabled = _ref3.disabled,
32
32
  disabled = _ref3$disabled === void 0 ? false : _ref3$disabled;
33
33
  return !disabled;
@@ -35,7 +35,7 @@ var defaultRender = function defaultRender() {
35
35
  var contentStyle = {
36
36
  paddingLeft: 24,
37
37
  paddingRight: 24,
38
- marginBottom: 16
38
+ paddingBottom: 16
39
39
  };
40
40
  var Body = (function (_ref) {
41
41
  var configData = _ref.configData,
package/lib/index.css CHANGED
@@ -2,7 +2,6 @@
2
2
  border-bottom-left-radius: 4px;
3
3
  border-bottom-right-radius: 4px;
4
4
  background-color: #fff;
5
- overflow: hidden;
6
5
  position: relative;
7
6
  }
8
7
  .ant-hw-table-body .ant-hw-table-pagination {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/table",
3
- "version": "0.0.5-beta-v7",
3
+ "version": "0.0.5-beta-v9",
4
4
  "description": "基于antd二次开发table组件",
5
5
  "keywords": [
6
6
  "table"
@@ -16,7 +16,7 @@ export const RowSelectionTitle = ({
16
16
  } = useHTableContext();
17
17
  const { records = [] } = data || {};
18
18
  const newData = records?.filter((item) => {
19
- const { disabled = false } = getCheckboxProps?.(data) || {};
19
+ const { disabled = false } = getCheckboxProps?.(item) || {};
20
20
  return !disabled;
21
21
  });
22
22
  const { keys, selectAll } = selectedRowData;
@@ -36,7 +36,7 @@ const defaultRender = () => {
36
36
  const contentStyle = {
37
37
  paddingLeft: 24,
38
38
  paddingRight: 24,
39
- marginBottom: 16,
39
+ paddingBottom: 16,
40
40
  };
41
41
  export default ({
42
42
  configData,
@@ -3,7 +3,6 @@
3
3
  border-bottom-left-radius: 4px;
4
4
  border-bottom-right-radius: 4px;
5
5
  background-color: #fff;
6
- overflow: hidden;
7
6
  position: relative;
8
7
  .@{ant-prefix}-hw-table-pagination{
9
8
  padding: 12px 24px;
@@ -36,7 +36,13 @@ export default () => {
36
36
  configData={configData}
37
37
  rowKey={"id"}
38
38
  table={hTable}
39
- rowSelection={{}}
39
+ rowSelection={{
40
+ getCheckboxProps:(item)=>{
41
+ return {
42
+ disabled:item.id===2
43
+ }
44
+ }
45
+ }}
40
46
  affixProps={{
41
47
  target: () => document.querySelector(".body"),
42
48
  }}
@@ -31,7 +31,13 @@ export default () => {
31
31
  const { run, loading, error, data } = useRequest(
32
32
  (params) => {
33
33
  const { current = 1 } = params;
34
- console.log(params, "params");
34
+ const arrayData = [];
35
+ for (let i = 0; i < 100; i = i + 1) {
36
+ arrayData.push({
37
+ id: i,
38
+ name: "11",
39
+ });
40
+ }
35
41
  return new Promise((resolve, reject) => {
36
42
  setTimeout(() => {
37
43
  // reject(new Error("错误"));
@@ -39,12 +45,7 @@ export default () => {
39
45
  size: "10",
40
46
  current: current.toString(10),
41
47
  total: "100",
42
- records: [
43
- {
44
- id: 1,
45
- name: "111",
46
- },
47
- ],
48
+ records:arrayData
48
49
  });
49
50
  }, 2000);
50
51
  });
@@ -62,9 +63,10 @@ export default () => {
62
63
  <Space direction={"vertical"} style={{ width: "100%" }}>
63
64
  <HTableHeader />
64
65
  <HTableBody
65
- pagination={false}
66
- scroll={{ x: 1000, y: 100 }}
67
66
  headerTitle={<AddBtn />}
67
+ affixProps={{
68
+ target: () => document.querySelector(".body"),
69
+ }}
68
70
  rowSelection={{
69
71
  onChange: () => {
70
72
  console.log("rowSelection");