ronds-metadata 1.3.70 → 1.3.72

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.
@@ -81,9 +81,6 @@ var MapTable = function MapTable(props) {
81
81
  }
82
82
  }
83
83
  }, [value]);
84
- React.useEffect(function () {
85
- setDisableArray(new Array(Math.min(tableDataSource === null || tableDataSource === void 0 ? void 0 : tableDataSource.length, tableDataTarget === null || tableDataTarget === void 0 ? void 0 : tableDataTarget.length)).fill(true));
86
- }, []);
87
84
  React.useEffect(function () {
88
85
  if (disableArray) {
89
86
  var _mapping = [];
@@ -113,7 +110,12 @@ var MapTable = function MapTable(props) {
113
110
  values.dataSource && setTableDataSource(values.dataSource);
114
111
  values.dataTarget && setTableDataTarget(values.dataTarget);
115
112
  values.options && setOptions(values.options);
116
- }, [form]);
113
+ if (!disableArray && values.dataSource && values.dataTarget) {
114
+ var _values$dataSource, _values$dataTarget;
115
+ var valueArray = new Array(Math.min((_values$dataSource = values.dataSource) === null || _values$dataSource === void 0 ? void 0 : _values$dataSource.length, (_values$dataTarget = values.dataTarget) === null || _values$dataTarget === void 0 ? void 0 : _values$dataTarget.length)).fill(true);
116
+ setDisableArray(valueArray);
117
+ }
118
+ }, [form.getFieldsValue()]);
117
119
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
118
120
  style: {
119
121
  width: '100%',
@@ -179,7 +181,7 @@ var MapTable = function MapTable(props) {
179
181
  }, /*#__PURE__*/React.createElement(Editable, {
180
182
  readonly: true,
181
183
  type: "single",
182
- columns: columnSource,
184
+ columns: columnTarget,
183
185
  dataSource: tableDataTarget,
184
186
  onRowConfirm: function onRowConfirm() {},
185
187
  onRowDelete: function onRowDelete() {},
@@ -198,11 +200,17 @@ var columnSource = [{
198
200
  }, {
199
201
  title: '类型',
200
202
  dataIndex: 'type',
201
- key: 'type'
203
+ key: 'type',
204
+ render: function render(val) {
205
+ return val !== null && val !== void 0 ? val : 'null';
206
+ }
202
207
  }, {
203
208
  title: '注释',
204
209
  dataIndex: 'label',
205
- key: 'label'
210
+ key: 'label',
211
+ render: function render(val) {
212
+ return val !== null && val !== void 0 ? val : 'null';
213
+ }
206
214
  }];
207
215
  var columnTarget = [{
208
216
  title: '来源表字段',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.3.70",
4
+ "version": "1.3.72",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",