ronds-metadata 1.0.63 → 1.0.64

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.
@@ -127,7 +127,7 @@ var EditableHeardCell = function EditableHeardCell(props) {
127
127
  };
128
128
 
129
129
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("th", _extends({}, restProps, {
130
- className: "ant-table-cell font-bold ".concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right ' : '', " ")
130
+ className: "ant-table-th font-bold ".concat(isAddColumn && editConfig.editHeardCellKey === dataIndex ? 'border-right ' : '', " ")
131
131
  }), isAddColumn && /*#__PURE__*/React.createElement(_Popover, {
132
132
  placement: "rightTop",
133
133
  content: content,
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import "antd/es/form/style";
2
3
  import _Form from "antd/es/form";
3
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
@@ -38,7 +39,11 @@ var EditableRow = function EditableRow(props) {
38
39
  initialValues: record,
39
40
  onValuesChange: onValuesChange,
40
41
  component: false
41
- }, /*#__PURE__*/React.createElement("tr", props)));
42
+ }, /*#__PURE__*/React.createElement("tr", _extends({}, props, {
43
+ style: {
44
+ height: '30px'
45
+ }
46
+ }))));
42
47
  };
43
48
 
44
49
  export default EditableRow;
@@ -0,0 +1,35 @@
1
+ .ronds-edit-table {
2
+ width: 100%;
3
+ height: 100%;
4
+ }
5
+ .ronds-edit-table .ant-spin-nested-loading,
6
+ .ronds-edit-table .ant-spin-container,
7
+ .ronds-edit-table .ant-table,
8
+ .ronds-edit-table .ant-table-container,
9
+ .ronds-edit-table .ant-table-content {
10
+ width: 100%;
11
+ height: 100%;
12
+ }
13
+ .ronds-edit-table .ant-table-cell,
14
+ .ronds-edit-table .ant-table-row {
15
+ height: 30px;
16
+ }
17
+ .ronds-edit-table .ant-table-body {
18
+ overflow-y: auto !important;
19
+ }
20
+ .ronds-edit-table .ant-table.ant-table-small .ant-table-thead > tr > th {
21
+ padding: 8px !important;
22
+ background-color: #ebebeb;
23
+ border-right: 1px solid #f2f2f2;
24
+ }
25
+ .ronds-edit-table .ant-table.ant-table-small .ant-table-title,
26
+ .ronds-edit-table .ant-table.ant-table-small .ant-table-footer,
27
+ .ronds-edit-table .ant-table.ant-table-small .ant-table-thead > tr > th,
28
+ .ronds-edit-table .ant-table.ant-table-small .ant-table-tbody > tr > td,
29
+ .ronds-edit-table .ant-table.ant-table-small tfoot > tr > th,
30
+ .ronds-edit-table .ant-table.ant-table-small tfoot > tr > td {
31
+ padding: 4px 8px;
32
+ }
33
+ .ronds-edit-table .ant-table.ant-table-bordered > .ant-table-container {
34
+ border: 1px solid #f0f0f0;
35
+ }
@@ -1,6 +1,7 @@
1
1
  import { TableProps } from 'antd';
2
2
  import { BehaviorSubject } from 'rxjs';
3
3
  import { EditColumnsType, IEditableStream } from './interface';
4
+ import './index.less';
4
5
  interface IEditableProps<R = any> {
5
6
  /**
6
7
  * 单行编辑或多行编辑。
@@ -18,7 +18,7 @@ import { isFreeEditRow, removeCurKeyFromEditRow } from './utils';
18
18
  import EditableHeardCell from './comps/EditableHeardCell';
19
19
  import useMemoSubject from '../../framework/rxjs-hooks/useMemoSubject';
20
20
  import useObservable from '../../framework/rxjs-hooks/useObservable';
21
- import AutoSize from '../AutoSize';
21
+ import "./index.css";
22
22
 
23
23
  var Editable = function Editable(props) {
24
24
  var _props$type = props.type,
@@ -372,38 +372,36 @@ var Editable = function Editable(props) {
372
372
  editHeardCellKey: editHeardCellKey
373
373
  }
374
374
  }
375
- }, /*#__PURE__*/React.createElement(AutoSize, null, function (_ref) {
376
- var height = _ref.height,
377
- width = _ref.width;
378
- return /*#__PURE__*/React.createElement(_Table, _extends({
379
- bordered: true,
380
- scroll: {
381
- y: height,
382
- x: width
383
- }
384
- }, tableProps, {
385
- pagination: false,
386
- rowKey: "_rowKey_",
387
- size: "small",
388
- columns: _columns,
389
- dataSource: _dataSource,
390
- components: {
391
- header: {
392
- cell: EditableHeardCell
393
- },
394
- body: {
395
- row: EditableRow,
396
- cell: EditableCell
397
- }
375
+ }, /*#__PURE__*/React.createElement(_Table, _extends({
376
+ className: "ronds-edit-table",
377
+ bordered: true,
378
+ tableLayout: "auto",
379
+ scroll: {
380
+ x: true,
381
+ y: 'calc(100% - 40px)'
382
+ }
383
+ }, tableProps, {
384
+ pagination: false,
385
+ rowKey: "_rowKey_",
386
+ size: "small",
387
+ columns: _columns,
388
+ dataSource: _dataSource,
389
+ components: {
390
+ header: {
391
+ cell: EditableHeardCell
398
392
  },
399
- onRow: function onRow(record, index) {
400
- return {
401
- record: record,
402
- index: index
403
- };
393
+ body: {
394
+ row: EditableRow,
395
+ cell: EditableCell
404
396
  }
405
- }));
406
- }), (type === 'multiple' || type === 'freedom') && !readonly && defaultValue && /*#__PURE__*/React.createElement(_Button, {
397
+ },
398
+ onRow: function onRow(record, index) {
399
+ return {
400
+ record: record,
401
+ index: index
402
+ };
403
+ }
404
+ })), (type === 'multiple' || type === 'freedom') && !readonly && defaultValue && /*#__PURE__*/React.createElement(_Button, {
407
405
  block: true,
408
406
  type: "dashed",
409
407
  style: {
@@ -93,7 +93,7 @@ function Index(props) {
93
93
  }, _callee);
94
94
  })), []);
95
95
  React.useEffect(function () {
96
- if (refId && isRefForm) {
96
+ if (refId && !isRefForm) {
97
97
  onSearch();
98
98
  }
99
99
  }, [refId, isRefForm, onSearch]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.0.63",
4
+ "version": "1.0.64",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",