@luck-design-biz/luckda 0.0.25-13 → 0.0.25-15

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 (45) hide show
  1. package/es/components/LdFormList/index.js +7 -5
  2. package/es/locales/zh-CN.js +0 -1
  3. package/es/lowcode/engine/meta/components-list.json +2 -2
  4. package/es/lowcode/engine/meta/form.props.default.json +2 -2
  5. package/es/lowcode/engine/meta/form.props.json +2 -2
  6. package/es/lowcode/engine/meta/js-editor/auto-complete.json +58 -4
  7. package/es/lowcode/engine/meta/table.props.default.json +2 -1
  8. package/es/lowcode/engine/meta/table.props.json +2 -1
  9. package/es/lowcode/engine/provider/ContextProvider/index.js +59 -16
  10. package/es/lowcode/painter/DesignToolbar.js +3 -4
  11. package/es/lowcode/painter/components/PreviewIframe.js +55 -0
  12. package/es/lowcode/painter/panel-section/DataSetSelector.js +1 -1
  13. package/es/lowcode/painter/panel-section/ImpExp.js +64 -55
  14. package/es/lowcode/painter/panel-section/ImpExpAlone.js +38 -22
  15. package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +18 -1
  16. package/es/lowcode/view/lc-components/Box/FunctionDesign.js +1 -1
  17. package/es/lowcode/view/lc-components/Form/index.js +69 -65
  18. package/es/lowcode/view/lc-components/Form/meta.json +2 -2
  19. package/es/lowcode/view/lc-components/PageLayout/index.js +4 -2
  20. package/es/lowcode/view/lc-components/Table/components/TopImex.js +4 -1
  21. package/es/lowcode/view/lc-components/Table/index.js +158 -159
  22. package/es/lowcode/view/lc-components/Table/meta.json +56 -16
  23. package/lib/components/LdFormList/index.js +7 -5
  24. package/lib/locales/zh-CN.js +0 -1
  25. package/lib/lowcode/engine/meta/components-list.json +2 -2
  26. package/lib/lowcode/engine/meta/form.props.default.json +2 -2
  27. package/lib/lowcode/engine/meta/form.props.json +2 -2
  28. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +58 -4
  29. package/lib/lowcode/engine/meta/table.props.default.json +2 -1
  30. package/lib/lowcode/engine/meta/table.props.json +2 -1
  31. package/lib/lowcode/engine/provider/ContextProvider/index.js +59 -16
  32. package/lib/lowcode/painter/DesignToolbar.js +3 -4
  33. package/lib/lowcode/painter/components/PreviewIframe.js +63 -0
  34. package/lib/lowcode/painter/panel-section/DataSetSelector.js +1 -1
  35. package/lib/lowcode/painter/panel-section/ImpExp.js +63 -54
  36. package/lib/lowcode/painter/panel-section/ImpExpAlone.js +37 -21
  37. package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +18 -1
  38. package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +1 -1
  39. package/lib/lowcode/view/lc-components/Form/index.js +69 -65
  40. package/lib/lowcode/view/lc-components/Form/meta.json +2 -2
  41. package/lib/lowcode/view/lc-components/PageLayout/index.js +4 -2
  42. package/lib/lowcode/view/lc-components/Table/components/TopImex.js +4 -1
  43. package/lib/lowcode/view/lc-components/Table/index.js +156 -157
  44. package/lib/lowcode/view/lc-components/Table/meta.json +56 -16
  45. package/package.json +5 -6
@@ -1,7 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  import React from 'react';
3
3
  import { useMemoizedFn, useSetState, useUpdateEffect } from 'ahooks';
4
- import { Checkbox, Row, Col, Input, Switch, Select, Tooltip, Spin } from 'luck-design/antd';
4
+ import { Checkbox, Row, Col, Input, Switch, Select, Tooltip, Spin, Radio } from 'luck-design/antd';
5
5
  import { Segmented } from 'luck-design/antd';
6
6
  import { formatMessage } from '@luck-design-biz/base/utils';
7
7
  import PanelItem from "../components/PanelItem";
@@ -10,7 +10,6 @@ import { useRemoteSource } from "../../engine/provider/ContextProvider";
10
10
  import styles from "../style/impexp.less";
11
11
  var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.impexp';
12
12
  var ImpExp = function ImpExp(_ref) {
13
- var _ref2;
14
13
  var defaultValue = _ref.defaultValue,
15
14
  onChange = _ref.onChange;
16
15
  var _useSetState = useSetState(defaultValue || {}),
@@ -38,13 +37,15 @@ var ImpExp = function ImpExp(_ref) {
38
37
  var handleSegmentChange = useMemoizedFn(function (field, e) {
39
38
  var _value = field;
40
39
  setState({
41
- type: _value
40
+ type: _value,
41
+ customType: false,
42
+ customParam: undefined
42
43
  });
43
44
  });
44
- var handleSwitchChange = useMemoizedFn(function (field, e) {
45
- var _value = field;
45
+ var handleSwitchChange = useMemoizedFn(function (e) {
46
+ var _value = e.target.value;
46
47
  setState({
47
- customType: _value,
48
+ customType: _value === '2',
48
49
  customParam: undefined
49
50
  });
50
51
  });
@@ -62,12 +63,18 @@ var ImpExp = function ImpExp(_ref) {
62
63
  onChange: handleSegmentChange,
63
64
  defaultValue: state.type,
64
65
  block: true
65
- })), /*#__PURE__*/React.createElement(PanelItem, {
66
- label: "\u81EA\u5B9A\u4E49",
66
+ })), state.type === 'import' && /*#__PURE__*/React.createElement(PanelItem, {
67
+ suppressPadding: true
68
+ }, /*#__PURE__*/React.createElement(Radio.Group, {
69
+ onChange: handleSwitchChange,
70
+ defaultValue: !state.customType ? '1' : '2'
71
+ }, /*#__PURE__*/React.createElement(Radio, {
72
+ value: "1"
73
+ }, "\u6A21\u7248ID"), /*#__PURE__*/React.createElement(Radio, {
74
+ value: "2"
75
+ }, "\u81EA\u5B9A\u4E49\u884C\u4E3A"))), state.type === 'import' && /*#__PURE__*/React.createElement(PanelItem, {
67
76
  suppressPadding: true
68
- }, /*#__PURE__*/React.createElement(Col, {
69
- span: 14
70
- }, !state.customType && state.type === 'import' ? /*#__PURE__*/React.createElement(Input, {
77
+ }, !state.customType ? /*#__PURE__*/React.createElement(Input, {
71
78
  size: "small",
72
79
  value: isString(state.customParam) ? state.customParam : '',
73
80
  onChange: function onChange(e) {
@@ -85,24 +92,33 @@ var ImpExp = function ImpExp(_ref) {
85
92
  id: "".concat(_I18N_PREFIX_, ".expType.placeholder"),
86
93
  label: '请选择自定义行为'
87
94
  })
88
- }, (_ref2 = state.type === 'export' ? expTypeList : impTypeList) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (opt) {
95
+ }, impTypeList.map(function (opt) {
89
96
  return /*#__PURE__*/React.createElement(Select.Option, {
90
97
  key: opt.key,
91
98
  value: opt.value
92
99
  }, /*#__PURE__*/React.createElement(Tooltip, {
93
100
  title: opt.label
94
101
  }, opt.label));
95
- }))), state.type === 'import' && /*#__PURE__*/React.createElement(Col, {
96
- span: 4,
97
- style: {
98
- textAlign: 'center'
99
- }
100
- }, /*#__PURE__*/React.createElement(Switch, {
102
+ }))), state.type === 'export' && /*#__PURE__*/React.createElement(PanelItem, {
103
+ suppressPadding: true
104
+ }, /*#__PURE__*/React.createElement(Select, {
101
105
  size: "small",
102
- defaultChecked: !!state.customType,
103
- onChange: handleSwitchChange,
104
- checkedChildren: "\u884C\u4E3A",
105
- unCheckedChildren: "\u6A21\u7248"
106
+ style: {
107
+ width: '100%'
108
+ },
109
+ value: isString(state.customParam) ? state.customParam : undefined,
110
+ onChange: handleSelectChange,
111
+ placeholder: formatMessage({
112
+ id: "".concat(_I18N_PREFIX_, ".expType.placeholder"),
113
+ label: '请选择自定义行为'
114
+ })
115
+ }, expTypeList === null || expTypeList === void 0 ? void 0 : expTypeList.map(function (opt) {
116
+ return /*#__PURE__*/React.createElement(Select.Option, {
117
+ key: opt.key,
118
+ value: opt.value
119
+ }, /*#__PURE__*/React.createElement(Tooltip, {
120
+ title: opt.label
121
+ }, opt.label));
106
122
  }))));
107
123
  };
108
124
  export default ImpExp;
@@ -5,7 +5,7 @@ import { useMemoizedFn } from 'ahooks';
5
5
  import classNames from 'classnames';
6
6
  import { Tooltip } from 'luck-design/antd';
7
7
  import styles from "../style/page-layout-display.less";
8
- var _TYPES_ = ['lr', 'lmr', 'ltb'];
8
+ var _TYPES_ = ['lr', 'tb', 'lmr', 'ltb'];
9
9
  var PageLayoutDisplay = function PageLayoutDisplay(_ref) {
10
10
  var defaultValue = _ref.defaultValue,
11
11
  onChange = _ref.onChange;
@@ -44,6 +44,23 @@ var PageLayoutDisplay = function PageLayoutDisplay(_ref) {
44
44
  flex: 3
45
45
  },
46
46
  className: styles['item-block']
47
+ })), _type === 'tb' && /*#__PURE__*/React.createElement("div", {
48
+ style: {
49
+ flex: 1,
50
+ display: 'flex',
51
+ flexDirection: 'column'
52
+ }
53
+ }, /*#__PURE__*/React.createElement("div", {
54
+ style: {
55
+ height: '50%',
56
+ borderBottom: '1px solid #eee'
57
+ },
58
+ className: styles['item-block']
59
+ }), /*#__PURE__*/React.createElement("div", {
60
+ style: {
61
+ height: '50%'
62
+ },
63
+ className: styles['item-block']
47
64
  })), _type === 'lmr' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
48
65
  style: {
49
66
  flex: 1,
@@ -17,7 +17,7 @@ var FunctionDesign = function FunctionDesign(_ref) {
17
17
  return !children || React.Children.count(children) === 0;
18
18
  }, [children]);
19
19
  return /*#__PURE__*/React.createElement(Index, _extends({
20
- className: classNames(styles['lc-component-box-design'], _defineProperty(_defineProperty({}, styles.placeholder, isEmpty), "className", !!className)),
20
+ className: classNames(styles['lc-component-box-design'], _defineProperty(_defineProperty({}, styles.placeholder, isEmpty), className, !!className)),
21
21
  style: _objectSpread({
22
22
  minHeight: 60
23
23
  }, style)
@@ -20,12 +20,12 @@ import RuntimeComp from "../JSX/RuntimeComp";
20
20
  import defaultMeta from "../../../engine/meta/form.props.default.json";
21
21
  import styles from "./index.less";
22
22
  var _I18N_PREFIX_ = 'lc.form.validator';
23
- var Header = function Header(_ref) {
24
- var _ref$header = _ref.header,
25
- header = _ref$header === void 0 ? 'collapse' : _ref$header,
26
- title = _ref.title,
27
- ldId = _ref.ldId,
28
- children = _ref.children;
23
+ var Header = function Header(_ref2) {
24
+ var _ref2$header = _ref2.header,
25
+ header = _ref2$header === void 0 ? 'collapse' : _ref2$header,
26
+ title = _ref2.title,
27
+ ldId = _ref2.ldId,
28
+ children = _ref2.children;
29
29
  if (header === 'collapse' || header === 'collapseFollow') return /*#__PURE__*/React.createElement(Collapse, {
30
30
  title: title || ldId,
31
31
  id: ldId,
@@ -53,28 +53,37 @@ var getMthodParams = function getMthodParams(methodStr) {
53
53
  }
54
54
  return [];
55
55
  };
56
- var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
56
+ var useCombinedRefs = function useCombinedRefs(forwardedRef) {
57
+ var innerRef = useRef(null);
58
+ useEffect(function () {
59
+ if (!forwardedRef) return;
60
+ if (typeof forwardedRef === 'function') {
61
+ forwardedRef(innerRef.current);
62
+ } else {
63
+ forwardedRef.current = innerRef.current;
64
+ }
65
+ }, [forwardedRef]);
66
+ return forwardedRef || innerRef;
67
+ };
68
+ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
57
69
  var _ctx$pagePublicResour2;
58
- var id = _ref2.id,
59
- parentId = _ref2.parentId,
60
- width = _ref2.width,
61
- height = _ref2.height,
62
- className = _ref2.className,
63
- blocks = _ref2.blocks,
64
- advance = _ref2.advance,
65
- initData = _ref2.initData,
66
- readOnly = _ref2.readOnly,
67
- showSave = _ref2.showSave,
68
- saveTitle = _ref2.saveTitle,
69
- getContainer = _ref2.getContainer,
70
- settingLayout = _ref2.settingLayout,
71
- renderFormLeft = _ref2.renderFormLeft,
72
- renderFormRight = _ref2.renderFormRight,
73
- children = _ref2.children;
70
+ var id = _ref3.id,
71
+ className = _ref3.className,
72
+ blocks = _ref3.blocks,
73
+ advance = _ref3.advance,
74
+ initData = _ref3.initData,
75
+ readOnly = _ref3.readOnly,
76
+ showSave = _ref3.showSave,
77
+ saveTitle = _ref3.saveTitle,
78
+ getContainer = _ref3.getContainer,
79
+ settingLayout = _ref3.settingLayout,
80
+ renderFormLeft = _ref3.renderFormLeft,
81
+ renderFormRight = _ref3.renderFormRight,
82
+ children = _ref3.children;
74
83
  var apiRef = useRef();
75
- var boxRef = useRef();
84
+ var wrapperRef = useRef();
85
+ var formRef = useCombinedRefs(ref);
76
86
  var promiseRef = useRef(null);
77
- var formRef = useRef();
78
87
  var ctx = useContext();
79
88
  var remoteSource = useRemoteSource();
80
89
  var _initData = useCreation(function () {
@@ -88,30 +97,30 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
88
97
  })) || [];
89
98
  }, [remoteSource.serials]);
90
99
  var _blocks = useCreation(function () {
91
- return blocks.filter(function (_ref3) {
92
- var hidden = _ref3.hidden;
100
+ return blocks.filter(function (_ref4) {
101
+ var hidden = _ref4.hidden;
93
102
  return !hidden;
94
103
  });
95
104
  }, [blocks]);
96
105
  useMount(function () {
97
106
  ctx.doAction(advance.events.onMount, {
98
- instance: (ref || formRef).current
107
+ instance: formRef.current
99
108
  });
100
109
  });
101
110
  useEffect(function () {
102
- var tid = ctx.$subscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED).on(function (_ref4) {
103
- var resource = _ref4.resource,
104
- prevResource = _ref4.prevResource;
111
+ var tid = ctx.$subscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED).on(function (_ref5) {
112
+ var resource = _ref5.resource,
113
+ prevResource = _ref5.prevResource;
105
114
  ctx.doAction(advance.events.onPagePublicResourceChanged, {
106
115
  resource: resource,
107
116
  prevResource: prevResource,
108
- instance: (ref || formRef).current
117
+ instance: formRef.current
109
118
  });
110
119
  }).watch();
111
120
  return function () {
112
121
  ctx.$unsubscriber(ctx.topics.PAGE_PUBLIC_RESOURCE_CHANGED, tid);
113
122
  ctx.doAction(advance.events.onUnmount, {
114
- instance: (ref || formRef).current
123
+ instance: formRef.current
115
124
  });
116
125
  };
117
126
  }, []);
@@ -122,7 +131,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
122
131
  * @method
123
132
  */
124
133
  getInstance: function getInstance() {
125
- return (ref || formRef).current;
134
+ return formRef.current;
126
135
  },
127
136
  /**
128
137
  * 提交表格数据
@@ -132,9 +141,9 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
132
141
  return new Promise(function (resolve) {
133
142
  var _ctx$pagePublicResour;
134
143
  promiseRef.current = resolve;
135
- var instance = (ref || formRef).current;
136
- var _ref5 = ((_ctx$pagePublicResour = ctx.pagePublicResource) === null || _ctx$pagePublicResour === void 0 ? void 0 : _ctx$pagePublicResour[id]) || initData || _initData || {},
137
- formMode = _ref5.formMode;
144
+ var instance = formRef.current;
145
+ var _ref6 = ((_ctx$pagePublicResour = ctx.pagePublicResource) === null || _ctx$pagePublicResour === void 0 ? void 0 : _ctx$pagePublicResour[id]) || initData || _initData || {},
146
+ formMode = _ref6.formMode;
138
147
  if (formMode === 'add') {
139
148
  instance.onAdd();
140
149
  } else if (formMode === 'update') {
@@ -160,7 +169,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
160
169
  * @returns {Block}
161
170
  */
162
171
  getBlock: function getBlock(blockId) {
163
- var instance = (ref || formRef).current;
172
+ var instance = formRef.current;
164
173
  var block = instance.formRefs[blockId];
165
174
  if (!block) {
166
175
  console.e('未发现区块');
@@ -229,7 +238,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
229
238
  };
230
239
  });
231
240
  var getTargetDom = useMemoizedFn(function () {
232
- return boxRef.current;
241
+ return wrapperRef.current;
233
242
  });
234
243
  var handleDefaultDataSourceFormat = useMemoizedFn(function (defaultDataSourceFormat, defaultValues) {
235
244
  if (isNil(defaultDataSourceFormat)) return function () {
@@ -237,10 +246,10 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
237
246
  };
238
247
  return executeCode(ctx, defaultDataSourceFormat, ['defaultValues'], defaultValues);
239
248
  });
240
- var handleDataSourceFormat = useMemoizedFn(function (dataSourceFormat, dataSetKey, _ref6) {
241
- var values = _ref6.values,
242
- submitData = _ref6.submitData,
243
- behaviorKey = _ref6.behaviorKey;
249
+ var handleDataSourceFormat = useMemoizedFn(function (dataSourceFormat, dataSetKey, _ref7) {
250
+ var values = _ref7.values,
251
+ submitData = _ref7.submitData,
252
+ behaviorKey = _ref7.behaviorKey;
244
253
  if (isNil(dataSourceFormat)) return _defineProperty({}, dataSetKey, submitData);
245
254
  return executeCode(ctx, dataSourceFormat, ['dataSetKey', 'values', 'submitData', 'behaviorKey'], dataSetKey, values, submitData, behaviorKey);
246
255
  });
@@ -251,8 +260,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
251
260
  if (isNil(actionsColumnReset)) return columns;
252
261
  return executeCode(ctx, actionsColumnReset, ['columns'], columns);
253
262
  });
254
- var handleGridFormReady = useMemoizedFn(function (onGridFormReady, ref, params, gridForm) {
255
- if (!isNil(onGridFormReady)) return executeCode(ctx, onGridFormReady, ['ref', 'params', 'gridForm'], ref, params, gridForm);
263
+ var handleGridFormReady = useMemoizedFn(function (onGridFormReady, _ref, params, gridForm) {
264
+ if (!isNil(onGridFormReady)) return executeCode(ctx, onGridFormReady, ['ref', 'params', 'gridForm'], _ref, params, gridForm);
256
265
  });
257
266
  var handleResetActions = useMemoizedFn(function (resetActions, data, index, actionList, params) {
258
267
  if (isNil(resetActions)) return actionList;
@@ -278,8 +287,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
278
287
  props.config.rules = props.config.rules || [];
279
288
  if ((_verifyListObj$length = verifyListObj.length) !== null && _verifyListObj$length !== void 0 && _verifyListObj$length.expression) props.config.rules.push({
280
289
  validator: function validator(rule, value, callback) {
281
- var _current;
282
- var length = executeCode(ctx, verifyListObj.length.expression, ['cValue'], (_current = (ref || formRef).current) === null || _current === void 0 ? void 0 : _current.getCValue());
290
+ var _formRef$current;
291
+ var length = executeCode(ctx, verifyListObj.length.expression, ['cValue'], (_formRef$current = formRef.current) === null || _formRef$current === void 0 ? void 0 : _formRef$current.getCValue());
283
292
  if (value.length > length) callback("".concat(formatMessage({
284
293
  id: "".concat(_I18N_PREFIX_, ".maxLength"),
285
294
  label: '字数不得超过'
@@ -292,8 +301,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
292
301
  });
293
302
  if ((_verifyListObj$min = verifyListObj.min) !== null && _verifyListObj$min !== void 0 && _verifyListObj$min.expression) props.config.rules.push({
294
303
  validator: function validator(rule, value, callback) {
295
- var _current2;
296
- var min = executeCode(ctx, verifyListObj.min.expression, ['cValue'], (_current2 = (ref || formRef).current) === null || _current2 === void 0 ? void 0 : _current2.getCValue());
304
+ var _formRef$current2;
305
+ var min = executeCode(ctx, verifyListObj.min.expression, ['cValue'], (_formRef$current2 = formRef.current) === null || _formRef$current2 === void 0 ? void 0 : _formRef$current2.getCValue());
297
306
  if (value < min) callback(formatMessage({
298
307
  id: "".concat(_I18N_PREFIX_, ".numberBelowMin"),
299
308
  label: '低于最小值'
@@ -303,8 +312,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
303
312
  });
304
313
  if ((_verifyListObj$max = verifyListObj.max) !== null && _verifyListObj$max !== void 0 && _verifyListObj$max.expression) props.config.rules.push({
305
314
  validator: function validator(rule, value, callback) {
306
- var _current3;
307
- var max = executeCode(ctx, verifyListObj.max.expression, ['cValue'], (_current3 = (ref || formRef).current) === null || _current3 === void 0 ? void 0 : _current3.getCValue());
315
+ var _formRef$current3;
316
+ var max = executeCode(ctx, verifyListObj.max.expression, ['cValue'], (_formRef$current3 = formRef.current) === null || _formRef$current3 === void 0 ? void 0 : _formRef$current3.getCValue());
308
317
  if (value > max) callback(formatMessage({
309
318
  id: "".concat(_I18N_PREFIX_, ".numberExceedMax"),
310
319
  label: '超过最大值'
@@ -317,8 +326,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
317
326
  if (verifyListObj.mobile) props.config.type = 'mobile';
318
327
  if ((_verifyListObj$rules = verifyListObj.rules) !== null && _verifyListObj$rules !== void 0 && _verifyListObj$rules.expression) props.config.rules.push({
319
328
  validator: function validator(rule, value, callback) {
320
- var _current4;
321
- executeCode(ctx, verifyListObj.rules.expression, ['cValue', 'rule', 'value', 'callback'], (_current4 = (ref || formRef).current) === null || _current4 === void 0 ? void 0 : _current4.getCValue(), rule, value, callback);
329
+ var _formRef$current4;
330
+ executeCode(ctx, verifyListObj.rules.expression, ['cValue', 'rule', 'value', 'callback'], (_formRef$current4 = formRef.current) === null || _formRef$current4 === void 0 ? void 0 : _formRef$current4.getCValue(), rule, value, callback);
322
331
  }
323
332
  });
324
333
  return props;
@@ -393,8 +402,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
393
402
  columnsReset: function columnsReset(columns) {
394
403
  return handleColumnsReset(item.columnsReset, columns);
395
404
  },
396
- onGridFormReady: function onGridFormReady(ref, params, gridForm) {
397
- return handleGridFormReady(item.onGridFormReady, ref, params, gridForm);
405
+ onGridFormReady: function onGridFormReady(_ref, params, gridForm) {
406
+ return handleGridFormReady(item.onGridFormReady, _ref, params, gridForm);
398
407
  }
399
408
  });
400
409
  if (item.actionsColumnReset) data = _objectSpread(_objectSpread({}, data), {}, {
@@ -466,7 +475,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
466
475
  });
467
476
  var beforeSubmit = useMemoizedFn(function (values, data) {
468
477
  return new Promise( /*#__PURE__*/function () {
469
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve) {
478
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve) {
470
479
  var _data;
471
480
  return _regeneratorRuntime().wrap(function _callee$(_context) {
472
481
  while (1) switch (_context.prev = _context.next) {
@@ -494,7 +503,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
494
503
  }, _callee);
495
504
  }));
496
505
  return function (_x) {
497
- return _ref8.apply(this, arguments);
506
+ return _ref9.apply(this, arguments);
498
507
  };
499
508
  }());
500
509
  });
@@ -521,13 +530,8 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
521
530
  displayName: "Form",
522
531
  getTargetDom: getTargetDom,
523
532
  api: apiRef
524
- }, /*#__PURE__*/React.createElement("div", {
525
- ref: boxRef,
526
- style: {
527
- width: width,
528
- height: height
529
- }
530
533
  }, /*#__PURE__*/React.createElement(LdFormList, {
534
+ wrapperRef: wrapperRef,
531
535
  id: id,
532
536
  ldId: id,
533
537
  className: classNames(styles['lc-component-form'], _defineProperty({}, className, !!className)),
@@ -535,7 +539,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
535
539
  renderFormExtra: renderFormExtra,
536
540
  mainFormLdId: "block_main",
537
541
  initData: ((_ctx$pagePublicResour2 = ctx.pagePublicResource) === null || _ctx$pagePublicResour2 === void 0 ? void 0 : _ctx$pagePublicResour2[id]) || initData || _initData,
538
- ref: ref || formRef,
542
+ ref: formRef,
539
543
  readOnly: readOnly,
540
544
  showSaveBtn: showSave,
541
545
  saveBtnTitle: saveTitle,
@@ -559,7 +563,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref2, ref) {
559
563
  }
560
564
  return (_promiseRef$current = promiseRef.current) === null || _promiseRef$current === void 0 ? void 0 : _promiseRef$current.call.apply(_promiseRef$current, [promiseRef].concat(rest));
561
565
  }
562
- })));
566
+ }));
563
567
  });
564
568
  LCForm.defaultProps = omitBadProps(defaultMeta);
565
569
  export default LCForm;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "component": "Form",
3
- "name": "表单",
4
- "desc": "表单组件是用于收集、验证和提交用户输入数据的重要组件。",
3
+ "name": "复杂表单",
4
+ "desc": "复杂表单组件是用于收集、验证和提交用户输入数据的重要组件。",
5
5
  "icon": "icon-form",
6
6
  "group": "advance",
7
7
  "groupName": "高级",
@@ -27,9 +27,11 @@ var LCPageLayout = function LCPageLayout(_ref) {
27
27
  }, /*#__PURE__*/React.createElement(StyledLayout, {
28
28
  wrapperRef: ref,
29
29
  $css: css
30
- }, /*#__PURE__*/React.createElement(Layout.Sider, null, children === null || children === void 0 ? void 0 : children[0]), /*#__PURE__*/React.createElement(Layout.Main, null, (children === null || children === void 0 ? void 0 : children.length) === display.split('').length ? /*#__PURE__*/React.createElement(React.Fragment, null, display === 'lr' ? children === null || children === void 0 ? void 0 : children[1] : /*#__PURE__*/React.createElement(MemorySplit, {
30
+ }, display === 'tb' ? /*#__PURE__*/React.createElement(Layout.Main, null, (children === null || children === void 0 ? void 0 : children.length) === display.split('').length ? /*#__PURE__*/React.createElement(MemorySplit, {
31
+ split: "horizontal"
32
+ }, children === null || children === void 0 ? void 0 : children[0], children === null || children === void 0 ? void 0 : children[1]) : null) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Layout.Sider, null, children === null || children === void 0 ? void 0 : children[0]), /*#__PURE__*/React.createElement(Layout.Main, null, (children === null || children === void 0 ? void 0 : children.length) === display.split('').length ? /*#__PURE__*/React.createElement(React.Fragment, null, display === 'lr' ? children === null || children === void 0 ? void 0 : children[1] : /*#__PURE__*/React.createElement(MemorySplit, {
31
33
  split: display === 'ltb' ? 'horizontal' : 'vertical'
32
- }, children === null || children === void 0 ? void 0 : children[1], children === null || children === void 0 ? void 0 : children[2])) : null)));
34
+ }, children === null || children === void 0 ? void 0 : children[1], children === null || children === void 0 ? void 0 : children[2])) : null))));
33
35
  };
34
36
  LCPageLayout.defaultProps = omitBadProps(defaultMeta);
35
37
  export default LCPageLayout;
@@ -215,7 +215,7 @@ export var TopUpload = function TopUpload(_ref4) {
215
215
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
216
216
  type: "primary",
217
217
  onClick: function onClick() {
218
- if (!options.import) {
218
+ if (!isString(options.import)) {
219
219
  return message.info("\u672A\u914D\u7F6E".concat(options.importType ? '行为' : '模版', "\uFF01"));
220
220
  }
221
221
  setVisible(true);
@@ -416,6 +416,9 @@ export var TopExport = function TopExport(_ref5) {
416
416
  return /*#__PURE__*/React.createElement(Button, {
417
417
  type: "primary",
418
418
  onClick: function onClick() {
419
+ if (isString(options.export) && !options.export) {
420
+ return message.info("\u672A\u914D\u7F6E\u884C\u4E3A\uFF01");
421
+ }
419
422
  doExportAll(handleExportAll);
420
423
  }
421
424
  }, "\u5BFC\u51FA");