@luck-design-biz/luckda 1.0.1-12 → 1.0.1-14

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.
Files changed (95) hide show
  1. package/es/components/LDActions/index.less +3 -1
  2. package/es/components/LdCard/index.js +154 -67
  3. package/es/components/LdTree/index.js +14 -8
  4. package/es/components/LdTree/index.less +2 -0
  5. package/es/helper/ldBuilder.js +1 -1
  6. package/es/locales/zh-CN.js +4 -2
  7. package/es/lowcode/engine/meta/cardlist.props.default.json +27 -7
  8. package/es/lowcode/engine/meta/cardlist.props.json +252 -71
  9. package/es/lowcode/engine/meta/components-list.json +24 -0
  10. package/es/lowcode/engine/meta/iframe.props.default.json +1 -2
  11. package/es/lowcode/engine/meta/iframe.props.json +2 -4
  12. package/es/lowcode/engine/meta/image.props.default.json +3 -3
  13. package/es/lowcode/engine/meta/image.props.json +50 -16
  14. package/es/lowcode/engine/meta/js-editor/auto-complete.json +14 -1
  15. package/es/lowcode/engine/meta/link.props.default.json +1 -2
  16. package/es/lowcode/engine/meta/link.props.json +8 -9
  17. package/es/lowcode/painter/DesignToolbar.js +1 -1
  18. package/es/lowcode/painter/Ribbon.js +12 -0
  19. package/es/lowcode/painter/components/code-editor/BaseEditor.js +2 -1
  20. package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
  21. package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +20 -2
  22. package/es/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
  23. package/es/lowcode/painter/panel-section/GroupClassSelector.js +1 -1
  24. package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +1 -0
  25. package/es/lowcode/painter/panel-section/TableTopFilter.js +3 -3
  26. package/es/lowcode/painter/style/action-bind-modal.less +5 -3
  27. package/es/lowcode/painter/style/design.less +10 -7
  28. package/es/lowcode/painter/style/list-editor.less +5 -3
  29. package/es/lowcode/painter/style/number-input.less +3 -1
  30. package/es/lowcode/painter/style/outline.less +3 -1
  31. package/es/lowcode/painter/style/panel-attrs.less +7 -3
  32. package/es/lowcode/painter/style/panel.less +9 -7
  33. package/es/lowcode/painter/style/radio.less +1 -1
  34. package/es/lowcode/painter/style/ribbon.less +4 -2
  35. package/es/lowcode/view/lc-components/CardList/index.js +476 -12
  36. package/es/lowcode/view/lc-components/CardList/meta.json +253 -72
  37. package/es/lowcode/view/lc-components/GroupTree/index.js +24 -8
  38. package/es/lowcode/view/lc-components/Iframe/index.js +57 -7
  39. package/es/lowcode/view/lc-components/Iframe/meta.json +2 -4
  40. package/es/lowcode/view/lc-components/Image/index.js +82 -6
  41. package/es/lowcode/view/lc-components/Image/index.less +27 -0
  42. package/es/lowcode/view/lc-components/Image/meta.json +50 -16
  43. package/es/lowcode/view/lc-components/Link/index.js +53 -5
  44. package/es/lowcode/view/lc-components/Link/index.less +15 -0
  45. package/es/lowcode/view/lc-components/Link/meta.json +8 -9
  46. package/es/lowcode/view/lc-components/Table/index.js +3 -5
  47. package/es/lowcode/view/lc-components/Tree/index.js +18 -11
  48. package/lib/components/LDActions/index.less +3 -1
  49. package/lib/components/LdCard/index.js +153 -66
  50. package/lib/components/LdTree/index.js +14 -8
  51. package/lib/components/LdTree/index.less +2 -0
  52. package/lib/helper/ldBuilder.js +2 -2
  53. package/lib/locales/zh-CN.js +4 -2
  54. package/lib/lowcode/engine/meta/cardlist.props.default.json +27 -7
  55. package/lib/lowcode/engine/meta/cardlist.props.json +252 -71
  56. package/lib/lowcode/engine/meta/components-list.json +24 -0
  57. package/lib/lowcode/engine/meta/iframe.props.default.json +1 -2
  58. package/lib/lowcode/engine/meta/iframe.props.json +2 -4
  59. package/lib/lowcode/engine/meta/image.props.default.json +3 -3
  60. package/lib/lowcode/engine/meta/image.props.json +50 -16
  61. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +14 -1
  62. package/lib/lowcode/engine/meta/link.props.default.json +1 -2
  63. package/lib/lowcode/engine/meta/link.props.json +8 -9
  64. package/lib/lowcode/painter/DesignToolbar.js +1 -1
  65. package/lib/lowcode/painter/Ribbon.js +12 -0
  66. package/lib/lowcode/painter/components/code-editor/BaseEditor.js +2 -1
  67. package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
  68. package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +19 -1
  69. package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
  70. package/lib/lowcode/painter/panel-section/GroupClassSelector.js +1 -1
  71. package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +1 -0
  72. package/lib/lowcode/painter/panel-section/TableTopFilter.js +3 -3
  73. package/lib/lowcode/painter/style/action-bind-modal.less +5 -3
  74. package/lib/lowcode/painter/style/design.less +10 -7
  75. package/lib/lowcode/painter/style/list-editor.less +5 -3
  76. package/lib/lowcode/painter/style/number-input.less +3 -1
  77. package/lib/lowcode/painter/style/outline.less +3 -1
  78. package/lib/lowcode/painter/style/panel-attrs.less +7 -3
  79. package/lib/lowcode/painter/style/panel.less +9 -7
  80. package/lib/lowcode/painter/style/radio.less +1 -1
  81. package/lib/lowcode/painter/style/ribbon.less +4 -2
  82. package/lib/lowcode/view/lc-components/CardList/index.js +475 -11
  83. package/lib/lowcode/view/lc-components/CardList/meta.json +253 -72
  84. package/lib/lowcode/view/lc-components/GroupTree/index.js +22 -6
  85. package/lib/lowcode/view/lc-components/Iframe/index.js +55 -5
  86. package/lib/lowcode/view/lc-components/Iframe/meta.json +2 -4
  87. package/lib/lowcode/view/lc-components/Image/index.js +80 -4
  88. package/lib/lowcode/view/lc-components/Image/index.less +27 -0
  89. package/lib/lowcode/view/lc-components/Image/meta.json +50 -16
  90. package/lib/lowcode/view/lc-components/Link/index.js +52 -4
  91. package/lib/lowcode/view/lc-components/Link/index.less +15 -0
  92. package/lib/lowcode/view/lc-components/Link/meta.json +8 -9
  93. package/lib/lowcode/view/lc-components/Table/index.js +3 -5
  94. package/lib/lowcode/view/lc-components/Tree/index.js +17 -10
  95. package/package.json +5 -5
@@ -1,29 +1,493 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
3
  var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
11
  var _react = _interopRequireWildcard(require("react"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
13
  var _ahooks = require("ahooks");
14
+ var _classnames = _interopRequireDefault(require("classnames"));
15
+ var _lodash = require("lodash");
16
+ var _base = require("@luck-design-biz/base");
17
+ var _ContextProvider = require("../../../engine/provider/ContextProvider");
12
18
  var _Wrapper = _interopRequireDefault(require("../Wrapper"));
13
- var _excluded = ["id"];
14
- var LCCardList = function LCCardList(_ref) {
19
+ var _index = require("../../../../index");
20
+ var _TopFilter = _interopRequireDefault(require("../Table/components/TopFilter"));
21
+ var _helper = require("../../../engine/tools/helper");
22
+ var _useCombinedRefs = _interopRequireDefault(require("../../../engine/tools/useCombinedRefs"));
23
+ var _cardlistPropsDefault = _interopRequireDefault(require("../../../engine/meta/cardlist.props.default.json"));
24
+ var _constants = require("../../../constants");
25
+ var LCCardList = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
15
26
  var id = _ref.id,
16
- props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
17
- var ref = (0, _react.useRef)();
27
+ className = _ref.className,
28
+ dataset = _ref.dataset,
29
+ readOnly = _ref.readOnly,
30
+ draggable = _ref.draggable,
31
+ col = _ref.col,
32
+ autoLoad = _ref.autoLoad,
33
+ pagination = _ref.pagination,
34
+ topActionGroup = _ref.topActionGroup,
35
+ topFilter = _ref.topFilter,
36
+ actions = _ref.actions,
37
+ suppressActions = _ref.suppressActions,
38
+ advance = _ref.advance,
39
+ showAddCard = _ref.showAddCard,
40
+ addCardHeight = _ref.addCardHeight,
41
+ addCardWords = _ref.addCardWords,
42
+ rowSelection = _ref.rowSelection,
43
+ disabledCheckbox = _ref.disabledCheckbox,
44
+ batchOperations = _ref.batchOperations,
45
+ pageSize = _ref.pageSize,
46
+ nocardBoxborder = _ref.nocardBoxborder,
47
+ showAvatar = _ref.showAvatar,
48
+ avatarUrl = _ref.avatarUrl,
49
+ showTitle = _ref.showTitle,
50
+ showDesc = _ref.showDesc,
51
+ renderTitle = _ref.renderTitle,
52
+ renderDescribe = _ref.renderDescribe,
53
+ renderContent = _ref.renderContent,
54
+ describeLines = _ref.describeLines;
55
+ var ctx = (0, _ContextProvider.useContext)();
56
+ var apiRef = (0, _react.useRef)();
57
+ var wrapperRef = (0, _react.useRef)();
58
+ var instanceRef = (0, _useCombinedRefs.default)(ref);
59
+ (0, _react.useImperativeHandle)(apiRef, function () {
60
+ return {
61
+ /**
62
+ * 获取表格实例
63
+ * @method
64
+ */
65
+ getInstance: function getInstance() {
66
+ return instanceRef.current;
67
+ },
68
+ /**
69
+ * 刷新表格
70
+ * @method
71
+ */
72
+ refresh: function refresh() {
73
+ var init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
74
+ return instanceRef.current.onLdQuery(init ? {
75
+ removeAll: {
76
+ operate: 'removeAll'
77
+ }
78
+ } : null);
79
+ }
80
+ };
81
+ });
82
+ var onActionClick = (0, _ahooks.useMemoizedFn)(function (action, props) {
83
+ var doAction = function doAction() {
84
+ ctx.doAction(action.actionPool, props);
85
+ };
86
+ if (action.riskLevel === 'danger') {
87
+ _base.Modal.confirm({
88
+ title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
89
+ onOk: doAction
90
+ });
91
+ } else if (action.riskLevel === 'destroy') {
92
+ (0, _base.recheck)({
93
+ title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
94
+ checkWords: "\u6267\u884C".concat(action.name),
95
+ onOk: doAction
96
+ });
97
+ } else {
98
+ doAction();
99
+ }
100
+ });
101
+ var _cardActions = (0, _ahooks.useCreation)(function () {
102
+ return suppressActions ? [] : actions.todoList.map(function (action) {
103
+ return {
104
+ key: action.id,
105
+ resource: action.serialEffect === "hidden" ? action.serial : null,
106
+ title: action.name,
107
+ iconNode: action.icon ? /*#__PURE__*/_react.default.createElement(_base.IconFont, {
108
+ type: action.icon
109
+ }) : action.name,
110
+ onClick: function onClick(data, e) {
111
+ return onActionClick(action, {
112
+ data: data,
113
+ e: e
114
+ });
115
+ },
116
+ style: action.riskLevel === 'default' ? null : {
117
+ color: {
118
+ danger: '#ff7875',
119
+ destroy: '#ff4d4f'
120
+ }[action.riskLevel]
121
+ },
122
+ disabled: action.serialEffect === "disable"
123
+ };
124
+ });
125
+ }, [suppressActions, actions]);
126
+ var _batchOperations = (0, _ahooks.useCreation)(function () {
127
+ return rowSelection && !readOnly ? batchOperations.todoList.map(function (action) {
128
+ return {
129
+ key: action.id,
130
+ wanted: action.serialEffect === "hidden" ? action.serial : null,
131
+ title: action.name,
132
+ style: action.riskLevel === 'default' ? null : {
133
+ color: {
134
+ danger: '#ff7875',
135
+ destroy: '#ff4d4f'
136
+ }[action.riskLevel]
137
+ },
138
+ disabled: action.serialEffect === "disable"
139
+ };
140
+ }) : [];
141
+ }, [rowSelection, batchOperations, readOnly]);
142
+ var batchOperationsByKey = (0, _ahooks.useCreation)(function () {
143
+ return (0, _lodash.keyBy)(batchOperations.todoList, 'id');
144
+ }, [batchOperations.todoList]);
145
+ var handleBatchOperationsClick = (0, _ahooks.useMemoizedFn)(function (key, data) {
146
+ var action = batchOperationsByKey[key];
147
+ if (action) onActionClick(action, {
148
+ data: data
149
+ });
150
+ });
151
+ var renderFunctionArea = (0, _react.useCallback)(function () {
152
+ var _topActionGroup$todoL;
153
+ var resultComp = [];
154
+ if (!!(topActionGroup !== null && topActionGroup !== void 0 && (_topActionGroup$todoL = topActionGroup.todoList) !== null && _topActionGroup$todoL !== void 0 && _topActionGroup$todoL.length)) {
155
+ resultComp.push( /*#__PURE__*/_react.default.createElement(_index.LDActions, (0, _extends2.default)({}, topActionGroup, {
156
+ doAction: function doAction(action) {
157
+ return ctx.doAction(action, {
158
+ instance: instanceRef.current,
159
+ datasetCode: dataset.code
160
+ });
161
+ }
162
+ })));
163
+ }
164
+ return resultComp;
165
+ }, [topActionGroup]);
166
+ var renderFilterArea = (0, _react.useCallback)(function () {
167
+ return topFilter ? /*#__PURE__*/_react.default.createElement(_TopFilter.default, {
168
+ filter: topFilter,
169
+ instance: instanceRef
170
+ }) : null;
171
+ }, [topFilter]);
172
+ var handleOperationsClick = (0, _ahooks.useMemoizedFn)(function (key, data, e) {
173
+ switch (key) {
174
+ case 'read':
175
+ ctx.doAction(advance.events.onCardClick, {
176
+ data: data,
177
+ e: e
178
+ });
179
+ break;
180
+ case 'delete':
181
+ ctx.doAction(advance.events.onCardDelete, {
182
+ data: data,
183
+ e: e
184
+ });
185
+ break;
186
+ default:
187
+ ;
188
+ }
189
+ });
190
+ var getCheckboxDisabled = (0, _ahooks.useMemoizedFn)(function (record) {
191
+ if ((0, _lodash.isNil)(disabledCheckbox)) return false;
192
+ return (0, _helper.executeCode)(ctx, disabledCheckbox, ['record'], record);
193
+ });
194
+ var getCheckboxProps = (0, _ahooks.useMemoizedFn)(function (record) {
195
+ return {
196
+ disabled: getCheckboxDisabled(record)
197
+ };
198
+ });
199
+ var _avatarUrl = (0, _ahooks.useMemoizedFn)(function (record) {
200
+ if ((0, _lodash.isNil)(avatarUrl)) return null;
201
+ return (0, _helper.executeCode)(ctx, avatarUrl, ['record'], record);
202
+ });
203
+ var _renderTitle = (0, _ahooks.useMemoizedFn)(function (record) {
204
+ if ((0, _lodash.isNil)(renderTitle)) return record.sname;
205
+ return (0, _helper.executeCode)(ctx, renderTitle, ['record'], record);
206
+ });
207
+ var _renderDescribe = (0, _ahooks.useMemoizedFn)(function (record) {
208
+ if ((0, _lodash.isNil)(renderDescribe)) return record.describe;
209
+ return (0, _helper.executeCode)(ctx, renderDescribe, ['record'], record);
210
+ });
211
+ var _renderContent = (0, _ahooks.useMemoizedFn)(function (record) {
212
+ if ((0, _lodash.isNil)(renderContent)) return null;
213
+ return (0, _helper.executeCode)(ctx, renderContent, ['record'], record);
214
+ });
215
+ var handleMount = (0, _ahooks.useMemoizedFn)(function (params) {
216
+ ctx.doAction(advance.events.onMount, {
217
+ params: params
218
+ });
219
+ });
220
+ var handleUnmount = (0, _ahooks.useMemoizedFn)(function () {
221
+ ctx.doAction(advance.events.onUnmount);
222
+ });
223
+ var handleAdd = (0, _ahooks.useMemoizedFn)(function () {
224
+ ctx.doAction(advance.events.onAddCardClick);
225
+ });
226
+ var handleDrop = (0, _ahooks.useMemoizedFn)(function (_ref2) {
227
+ var dragNodeProps = _ref2.dragNodeProps,
228
+ targetNodeProps = _ref2.targetNodeProps,
229
+ evt = _ref2.evt;
230
+ ctx.doAction(advance.events.onDrop, {
231
+ dragNodeProps: dragNodeProps,
232
+ targetNodeProps: targetNodeProps,
233
+ evt: evt
234
+ });
235
+ });
236
+ var events = (0, _ahooks.useCreation)(function () {
237
+ if (advance !== null && advance !== void 0 && advance.events) {
238
+ var _events = {};
239
+ if (advance.events.onMount) _events.onMount = handleMount;
240
+ if (advance.events.onUnmount) _events.onUnmount = handleUnmount;
241
+ if (advance.events.onAddCardClick) _events.onAdd = handleAdd;
242
+ if (advance.events.onDrop) _events.onDrop = handleDrop;
243
+ return _events;
244
+ }
245
+ return {};
246
+ }, [advance === null || advance === void 0 ? void 0 : advance.events]);
247
+ var _wrapperProps = (0, _ahooks.useCreation)(function () {
248
+ return (0, _defineProperty2.default)({
249
+ id: id
250
+ }, _constants.LC_COMPONENT_UNIT_KEY, _constants.LC_COMPONENT_UNIT);
251
+ }, []);
18
252
  var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
19
- return ref.current;
253
+ return wrapperRef.current;
20
254
  });
21
255
  return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
22
256
  id: id,
23
257
  displayName: "CardList",
24
- getTargetDom: getTargetDom
25
- }, /*#__PURE__*/_react.default.createElement("div", {
26
- ref: ref
27
- }, "LCCardList"));
258
+ getTargetDom: getTargetDom,
259
+ api: apiRef
260
+ }, /*#__PURE__*/_react.default.createElement(_index.LdCard, (0, _extends2.default)({
261
+ ref: instanceRef,
262
+ wrapper: wrapperRef,
263
+ wrapperProps: _wrapperProps,
264
+ _loading: ctx.loading,
265
+ className: (0, _classnames.default)((0, _defineProperty2.default)({}, className, !!className)),
266
+ ldId: id,
267
+ dataSetKey: dataset === null || dataset === void 0 ? void 0 : dataset.code,
268
+ readOnly: readOnly,
269
+ isFlow: !pagination,
270
+ draggable: draggable,
271
+ col: col,
272
+ suppressInit: !autoLoad,
273
+ renderFunctionArea: renderFunctionArea,
274
+ renderFilterArea: renderFilterArea,
275
+ cardActions: _cardActions,
276
+ maxActionsCount: actions === null || actions === void 0 ? void 0 : actions.max,
277
+ onOperationsClick: handleOperationsClick,
278
+ renderAddCard: showAddCard ? addCardWords : false,
279
+ AddCardHeight: addCardHeight,
280
+ rowSelection: rowSelection && !readOnly ? {
281
+ getCheckboxProps: getCheckboxProps
282
+ } : false,
283
+ batchOperations: _batchOperations,
284
+ onBatchOperationsClick: handleBatchOperationsClick,
285
+ overModel: {
286
+ pageSize: pageSize
287
+ },
288
+ cardConfig: {
289
+ nocardBoxborder: nocardBoxborder,
290
+ showAvatar: showAvatar,
291
+ avatarUrl: _avatarUrl,
292
+ showTitle: showTitle,
293
+ showDesc: showDesc,
294
+ describeLines: describeLines,
295
+ renderTitle: _renderTitle,
296
+ renderDescribe: _renderDescribe,
297
+ renderContent: _renderContent
298
+ }
299
+ }, events)));
300
+ });
301
+ LCCardList.propTypes = {
302
+ /**
303
+ * @name 唯一标识
304
+ * @type string
305
+ * @disabled true
306
+ */
307
+ id: _propTypes.default.string.isRequired,
308
+ /**
309
+ * @name 数据集
310
+ * @type _DataSetSelector
311
+ */
312
+ dataset: _propTypes.default.shape({
313
+ code: _propTypes.default.string.isRequired,
314
+ uid: _propTypes.default.string.isRequired
315
+ }),
316
+ /**
317
+ * @name 自动加载
318
+ * @desc 首次数据是否自动加载,若存在必须带搜索条件再加载的情况,需要关闭
319
+ * @type switch
320
+ * @default true
321
+ */
322
+ autoLoad: _propTypes.default.bool,
323
+ /**
324
+ * @name 只读
325
+ * @type switch
326
+ * @default false
327
+ */
328
+ readOnly: _propTypes.default.bool,
329
+ /**
330
+ * @name 列数
331
+ * @type number
332
+ * @default 4
333
+ */
334
+ col: _propTypes.default.number,
335
+ /**
336
+ * @name 隐藏操作列
337
+ * @type switch
338
+ * @default false
339
+ * @groupNext actionsColumn
340
+ */
341
+ suppressActions: _propTypes.default.bool,
342
+ /**
343
+ * @name 最大显示数
344
+ * @type number
345
+ * @default 2
346
+ * @groupNext actionsColumn
347
+ */
348
+ maxActionsCount: _propTypes.default.number,
349
+ /**
350
+ * @name 操作项
351
+ * @type _TableActions
352
+ * @groupNext actionsColumn
353
+ * @default {"max": 3, "moreText": "更多操作", "todoList": []}
354
+ */
355
+ actions: _propTypes.default.shape({
356
+ max: _propTypes.default.number,
357
+ moreText: _propTypes.default.string,
358
+ todoList: _propTypes.default.array
359
+ }),
360
+ /**
361
+ * @name 顶部操作
362
+ * @type _ActionGroup
363
+ * @default {"display": "button", "max": 2, "moreText": "操作", "todoList": []}
364
+ */
365
+ topActionGroup: _propTypes.default.shape({
366
+ display: _propTypes.default.oneOf(['text', 'button']),
367
+ max: _propTypes.default.number,
368
+ moreText: _propTypes.default.string,
369
+ todoList: _propTypes.default.array
370
+ }),
371
+ /**
372
+ * @name 顶部过滤器
373
+ * @type _TableTopFilter
374
+ */
375
+ topFilter: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array, _propTypes.default.shape({
376
+ options: _propTypes.default.array.isRequired,
377
+ field: _propTypes.default.string.isRequired
378
+ })]),
379
+ /**
380
+ * @name 展示新增卡片
381
+ * @type switch
382
+ * @default false
383
+ */
384
+ showAddCard: _propTypes.default.bool,
385
+ /**
386
+ * @name 新增卡片高度
387
+ * @type number
388
+ * @default 240
389
+ */
390
+ addCardHeight: _propTypes.default.number,
391
+ /**
392
+ * @name 新增卡片内容
393
+ * @type string
394
+ * @disabled "新建"
395
+ */
396
+ addCardWords: _propTypes.default.string,
397
+ /**
398
+ * @name 开启选择器
399
+ * @type switch
400
+ * @default false
401
+ */
402
+ rowSelection: _propTypes.default.bool,
403
+ /**
404
+ * @name 不可选卡片
405
+ * @type _JSEditor
406
+ * @default "function disabledCheckbox(record) { \n return false; \n}"
407
+ */
408
+ disabledCheckbox: _propTypes.default.string,
409
+ /**
410
+ * @name 卡片操作项
411
+ * @type _ActionsEditor
412
+ */
413
+ batchOperations: _propTypes.default.shape({
414
+ todoList: _propTypes.default.array.isRequired
415
+ }),
416
+ /**
417
+ * @name 每页行数
418
+ * @type number
419
+ * @default 40
420
+ */
421
+ pageSize: _propTypes.default.number,
422
+ /**
423
+ * @name 无边框风格
424
+ * @type switch
425
+ * @default false
426
+ */
427
+ nocardBoxborder: _propTypes.default.bool,
428
+ /**
429
+ * @name 显示图标
430
+ * @type switch
431
+ * @default true
432
+ */
433
+ showAvatar: _propTypes.default.bool,
434
+ /**
435
+ * @name 图标地址
436
+ * @type _JSEditor
437
+ * @default "function avatarUrl(record) { \n return null; \n}"
438
+ */
439
+ avatarUrl: _propTypes.default.string,
440
+ /**
441
+ * @name 显示标题
442
+ * @type switch
443
+ * @default true
444
+ */
445
+ showTitle: _propTypes.default.bool,
446
+ /**
447
+ * @name 标题内容
448
+ * @type _JSEditor
449
+ * @default "function renderTitle(record) { \n return record.sname; \n}"
450
+ */
451
+ renderTitle: _propTypes.default.string,
452
+ /**
453
+ * @name 显示描述
454
+ * @type switch
455
+ * @default true
456
+ */
457
+ showDesc: _propTypes.default.bool,
458
+ /**
459
+ * @name 描述最大展示行
460
+ * @type number
461
+ * @default 2
462
+ */
463
+ describeLines: _propTypes.default.number,
464
+ /**
465
+ * @name 描述内容
466
+ * @type _JSEditor
467
+ * @default "function renderDescribe(record) { \n return record.describe; \n}"
468
+ */
469
+ renderDescribe: _propTypes.default.string,
470
+ /**
471
+ * @name 自定义
472
+ * @type _JSEditor
473
+ * @default "function renderContent(record) { \n return null; \n}"
474
+ */
475
+ renderContent: _propTypes.default.string,
476
+ /**
477
+ * @name 组件首次渲染时
478
+ * @type _JSEditor
479
+ */
480
+ onMount: _propTypes.default.string,
481
+ /**
482
+ * @name 组件卸载时
483
+ * @type _JSEditor
484
+ */
485
+ onUnmount: _propTypes.default.string,
486
+ /**
487
+ * @name 新增卡片点击时
488
+ * @type _JSEditor
489
+ */
490
+ onAddCardClick: _propTypes.default.string
28
491
  };
492
+ LCCardList.defaultProps = (0, _helper.omitBadProps)(_cardlistPropsDefault.default);
29
493
  var _default = exports.default = LCCardList;