ls-pro-common 1.0.28 → 1.0.29
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/dist/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/components/InputTable.js +19 -9
- package/lib/components/InputTable.js +19 -9
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
10
10
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
11
11
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
12
12
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
13
|
-
var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect"],
|
|
13
|
+
var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps"],
|
|
14
14
|
_excluded2 = ["current", "pageSize"];
|
|
15
15
|
import React from "react";
|
|
16
16
|
import { useRef, useState, useEffect, useContext } from 'react';
|
|
@@ -66,6 +66,7 @@ function InputTable(prop) {
|
|
|
66
66
|
allowClear = _prop$allowClear === void 0 ? true : _prop$allowClear,
|
|
67
67
|
_prop$keepSelect = prop.keepSelect,
|
|
68
68
|
keepSelect = _prop$keepSelect === void 0 ? false : _prop$keepSelect,
|
|
69
|
+
fieldProps = prop.fieldProps,
|
|
69
70
|
rest = _objectWithoutProperties(prop, _excluded);
|
|
70
71
|
|
|
71
72
|
var textNameProp = textName || name + '__text';
|
|
@@ -148,7 +149,6 @@ function InputTable(prop) {
|
|
|
148
149
|
var tableDom = /*#__PURE__*/React.createElement(ProTable, _extends({
|
|
149
150
|
columns: columns,
|
|
150
151
|
request: loadData,
|
|
151
|
-
rowKey: valueField,
|
|
152
152
|
manualRequest: false,
|
|
153
153
|
actionRef: tableRef,
|
|
154
154
|
search: {
|
|
@@ -219,7 +219,7 @@ function InputTable(prop) {
|
|
|
219
219
|
name: name
|
|
220
220
|
})), rest.label ? /*#__PURE__*/React.createElement(ProFormText, _extends({
|
|
221
221
|
name: textNameProp
|
|
222
|
-
}, rest), /*#__PURE__*/React.createElement(_Input, {
|
|
222
|
+
}, rest), /*#__PURE__*/React.createElement(_Input, _extends({
|
|
223
223
|
suffix: /*#__PURE__*/React.createElement(_Popover, {
|
|
224
224
|
content: /*#__PURE__*/React.createElement("div", {
|
|
225
225
|
style: {
|
|
@@ -232,9 +232,14 @@ function InputTable(prop) {
|
|
|
232
232
|
trigger: "click",
|
|
233
233
|
visible: visible,
|
|
234
234
|
onVisibleChange: setVisible
|
|
235
|
-
}, /*#__PURE__*/React.createElement(MoreOutlined,
|
|
235
|
+
}, /*#__PURE__*/React.createElement(MoreOutlined, {
|
|
236
|
+
onClick: function onClick(e) {
|
|
237
|
+
setVisible(true);
|
|
238
|
+
e.stopPropagation && e.stopPropagation();
|
|
239
|
+
}
|
|
240
|
+
})),
|
|
236
241
|
onClick: function onClick() {
|
|
237
|
-
|
|
242
|
+
setVisible(true);
|
|
238
243
|
},
|
|
239
244
|
onInput: function onInput(e) {
|
|
240
245
|
var _formRef$current6;
|
|
@@ -257,7 +262,7 @@ function InputTable(prop) {
|
|
|
257
262
|
},
|
|
258
263
|
readOnly: readonly,
|
|
259
264
|
allowClear: allowClear
|
|
260
|
-
})) : /*#__PURE__*/React.createElement(_Input, _extends({
|
|
265
|
+
}, fieldProps))) : /*#__PURE__*/React.createElement(_Input, _extends({
|
|
261
266
|
suffix: /*#__PURE__*/React.createElement(_Popover, {
|
|
262
267
|
content: /*#__PURE__*/React.createElement("div", {
|
|
263
268
|
style: {
|
|
@@ -270,9 +275,14 @@ function InputTable(prop) {
|
|
|
270
275
|
trigger: "click",
|
|
271
276
|
visible: visible,
|
|
272
277
|
onVisibleChange: setVisible
|
|
273
|
-
}, /*#__PURE__*/React.createElement(MoreOutlined,
|
|
278
|
+
}, /*#__PURE__*/React.createElement(MoreOutlined, {
|
|
279
|
+
onClick: function onClick(e) {
|
|
280
|
+
setVisible(true);
|
|
281
|
+
e.stopPropagation && e.stopPropagation();
|
|
282
|
+
}
|
|
283
|
+
})),
|
|
274
284
|
onClick: function onClick() {
|
|
275
|
-
|
|
285
|
+
setVisible(true);
|
|
276
286
|
},
|
|
277
287
|
onInput: function onInput(e) {
|
|
278
288
|
var _formRef$current8;
|
|
@@ -299,7 +309,7 @@ function InputTable(prop) {
|
|
|
299
309
|
readOnly: readonly,
|
|
300
310
|
value: text,
|
|
301
311
|
allowClear: allowClear
|
|
302
|
-
},
|
|
312
|
+
}, fieldProps)));
|
|
303
313
|
}
|
|
304
314
|
|
|
305
315
|
export default InputTable;
|
|
@@ -43,7 +43,7 @@ var _icons = require("@ant-design/icons");
|
|
|
43
43
|
|
|
44
44
|
var _http = require("../http");
|
|
45
45
|
|
|
46
|
-
var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect"],
|
|
46
|
+
var _excluded = ["columns", "url", "textName", "name", "tableConfig", "tableHeight", "tableWidth", "readonly", "multiple", "valueField", "labelWidth", "textField", "onSelectChange", "beforeLoad", "afterLoad", "isV2", "allowClear", "keepSelect", "fieldProps"],
|
|
47
47
|
_excluded2 = ["current", "pageSize"];
|
|
48
48
|
|
|
49
49
|
function InputTable(prop) {
|
|
@@ -93,6 +93,7 @@ function InputTable(prop) {
|
|
|
93
93
|
allowClear = _prop$allowClear === void 0 ? true : _prop$allowClear,
|
|
94
94
|
_prop$keepSelect = prop.keepSelect,
|
|
95
95
|
keepSelect = _prop$keepSelect === void 0 ? false : _prop$keepSelect,
|
|
96
|
+
fieldProps = prop.fieldProps,
|
|
96
97
|
rest = (0, _objectWithoutProperties2.default)(prop, _excluded);
|
|
97
98
|
var textNameProp = textName || name + '__text';
|
|
98
99
|
|
|
@@ -175,7 +176,6 @@ function InputTable(prop) {
|
|
|
175
176
|
var tableDom = /*#__PURE__*/_react.default.createElement(_lsProTable.default, (0, _extends2.default)({
|
|
176
177
|
columns: columns,
|
|
177
178
|
request: loadData,
|
|
178
|
-
rowKey: valueField,
|
|
179
179
|
manualRequest: false,
|
|
180
180
|
actionRef: tableRef,
|
|
181
181
|
search: {
|
|
@@ -247,7 +247,7 @@ function InputTable(prop) {
|
|
|
247
247
|
name: name
|
|
248
248
|
})), rest.label ? /*#__PURE__*/_react.default.createElement(_lsProForm.ProFormText, (0, _extends2.default)({
|
|
249
249
|
name: textNameProp
|
|
250
|
-
}, rest), /*#__PURE__*/_react.default.createElement(_input.default, {
|
|
250
|
+
}, rest), /*#__PURE__*/_react.default.createElement(_input.default, (0, _extends2.default)({
|
|
251
251
|
suffix: /*#__PURE__*/_react.default.createElement(_popover.default, {
|
|
252
252
|
content: /*#__PURE__*/_react.default.createElement("div", {
|
|
253
253
|
style: {
|
|
@@ -260,9 +260,14 @@ function InputTable(prop) {
|
|
|
260
260
|
trigger: "click",
|
|
261
261
|
visible: visible,
|
|
262
262
|
onVisibleChange: setVisible
|
|
263
|
-
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined,
|
|
263
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
|
|
264
|
+
onClick: function onClick(e) {
|
|
265
|
+
setVisible(true);
|
|
266
|
+
e.stopPropagation && e.stopPropagation();
|
|
267
|
+
}
|
|
268
|
+
})),
|
|
264
269
|
onClick: function onClick() {
|
|
265
|
-
|
|
270
|
+
setVisible(true);
|
|
266
271
|
},
|
|
267
272
|
onInput: function onInput(e) {
|
|
268
273
|
var _formRef$current6;
|
|
@@ -285,7 +290,7 @@ function InputTable(prop) {
|
|
|
285
290
|
},
|
|
286
291
|
readOnly: readonly,
|
|
287
292
|
allowClear: allowClear
|
|
288
|
-
})) : /*#__PURE__*/_react.default.createElement(_input.default, (0, _extends2.default)({
|
|
293
|
+
}, fieldProps))) : /*#__PURE__*/_react.default.createElement(_input.default, (0, _extends2.default)({
|
|
289
294
|
suffix: /*#__PURE__*/_react.default.createElement(_popover.default, {
|
|
290
295
|
content: /*#__PURE__*/_react.default.createElement("div", {
|
|
291
296
|
style: {
|
|
@@ -298,9 +303,14 @@ function InputTable(prop) {
|
|
|
298
303
|
trigger: "click",
|
|
299
304
|
visible: visible,
|
|
300
305
|
onVisibleChange: setVisible
|
|
301
|
-
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined,
|
|
306
|
+
}, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
|
|
307
|
+
onClick: function onClick(e) {
|
|
308
|
+
setVisible(true);
|
|
309
|
+
e.stopPropagation && e.stopPropagation();
|
|
310
|
+
}
|
|
311
|
+
})),
|
|
302
312
|
onClick: function onClick() {
|
|
303
|
-
|
|
313
|
+
setVisible(true);
|
|
304
314
|
},
|
|
305
315
|
onInput: function onInput(e) {
|
|
306
316
|
var _formRef$current8;
|
|
@@ -327,7 +337,7 @@ function InputTable(prop) {
|
|
|
327
337
|
readOnly: readonly,
|
|
328
338
|
value: text,
|
|
329
339
|
allowClear: allowClear
|
|
330
|
-
},
|
|
340
|
+
}, fieldProps)));
|
|
331
341
|
}
|
|
332
342
|
|
|
333
343
|
var _default = InputTable;
|