@luck-design-biz/luckda 1.0.1 → 1.0.2
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/es/components/LDActions/index.less +3 -1
- package/es/components/LdAutoForm/index.js +2 -1
- package/es/components/LdCard/index.js +154 -67
- package/es/components/LdFormList/index.js +20 -6
- package/es/components/LdGridForm/index.js +40 -24
- package/es/components/LdTree/index.js +14 -8
- package/es/components/LdTree/index.less +4 -2
- package/es/helper/ldBuilder.js +1 -1
- package/es/locales/zh-CN.js +13 -4
- package/es/lowcode/constants/index.js +1 -1
- package/es/lowcode/engine/meta/cardlist.props.default.json +27 -6
- package/es/lowcode/engine/meta/cardlist.props.json +254 -72
- package/es/lowcode/engine/meta/components-list.json +6 -102
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/es/lowcode/engine/meta/dialog.props.json +74 -18
- package/es/lowcode/engine/meta/drawer.props.default.json +15 -4
- package/es/lowcode/engine/meta/drawer.props.json +144 -24
- package/es/lowcode/engine/meta/form.props.default.json +14 -3
- package/es/lowcode/engine/meta/form.props.json +49 -9
- package/es/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/es/lowcode/engine/meta/grouptree.props.json +83 -0
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/es/lowcode/engine/meta/iframe.props.json +3 -4
- package/es/lowcode/engine/meta/image.props.default.json +3 -2
- package/es/lowcode/engine/meta/image.props.json +51 -16
- package/es/lowcode/engine/meta/imex.props.json +1 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +23 -5
- package/es/lowcode/engine/meta/link.props.default.json +1 -1
- package/es/lowcode/engine/meta/link.props.json +9 -9
- package/es/lowcode/engine/meta/table.props.json +1 -1
- package/es/lowcode/engine/meta/tabs.props.default.json +1 -1
- package/es/lowcode/engine/meta/tabs.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.json +2 -2
- package/es/lowcode/engine/provider/ContextProvider/index.js +6 -2
- package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +82 -2
- package/es/lowcode/engine/tools/helper.js +21 -0
- package/es/lowcode/engine/tools/useCanvasRender.js +13 -1
- package/es/lowcode/painter/Components.js +6 -1
- package/es/lowcode/painter/Design.js +1 -0
- package/es/lowcode/painter/DesignOperator.js +25 -15
- package/es/lowcode/painter/DesignToolbar.js +78 -47
- package/es/lowcode/painter/Ribbon.js +14 -1
- package/es/lowcode/painter/components/ActionBindModal.js +3 -7
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +144 -37
- package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +29 -6
- package/es/lowcode/painter/components/DragDrop/Overlay.js +5 -2
- package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
- package/es/lowcode/painter/components/NumberInput.js +1 -1
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +2 -1
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/es/lowcode/painter/components/field-setting/SettingUI.js +30 -2
- package/es/lowcode/painter/components/field-setting/index.js +26 -12
- package/es/lowcode/painter/expect.js +27 -0
- package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +20 -2
- package/es/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
- package/es/lowcode/painter/panel-section/ComplexPop.js +1 -1
- package/es/lowcode/painter/panel-section/DataSetSelector.js +14 -3
- package/es/lowcode/painter/panel-section/FieldsSetting.js +2 -2
- package/es/lowcode/painter/panel-section/GroupClassSelector.js +55 -0
- package/es/lowcode/painter/panel-section/PageVars.js +1 -1
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +1 -0
- package/es/lowcode/painter/panel-section/TabItems.js +1 -1
- package/es/lowcode/painter/panel-section/TableTopFilter.js +3 -3
- package/es/lowcode/painter/style/action-bind-modal.less +5 -3
- package/es/lowcode/painter/style/design.less +26 -7
- package/es/lowcode/painter/style/dragdrop.less +46 -0
- package/es/lowcode/painter/style/list-editor.less +5 -3
- package/es/lowcode/painter/style/number-input.less +3 -1
- package/es/lowcode/painter/style/outline.less +3 -1
- package/es/lowcode/painter/style/panel-attrs.less +7 -3
- package/es/lowcode/painter/style/panel.less +9 -7
- package/es/lowcode/painter/style/radio.less +1 -1
- package/es/lowcode/painter/style/ribbon.less +4 -2
- package/es/lowcode/painter/svg/code.svg +3 -0
- package/es/lowcode/painter/svg/expect.svg +9 -0
- package/es/lowcode/view/lc-components/CardList/index.js +481 -12
- package/es/lowcode/view/lc-components/CardList/meta.json +255 -73
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +14 -6
- package/es/lowcode/view/lc-components/Dialog/index.js +15 -5
- package/es/lowcode/view/lc-components/Dialog/index.less +4 -0
- package/es/lowcode/view/lc-components/Dialog/meta.json +72 -18
- package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +51 -8
- package/es/lowcode/view/lc-components/Drawer/index.js +139 -24
- package/es/lowcode/view/lc-components/Drawer/index.less +11 -8
- package/es/lowcode/view/lc-components/Drawer/meta.json +136 -25
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
- package/es/lowcode/view/lc-components/Form/index.js +45 -28
- package/es/lowcode/view/lc-components/Form/meta.json +44 -8
- package/es/lowcode/view/lc-components/GroupTree/FunctionDesign.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/GroupTree/index.js +212 -0
- package/es/lowcode/view/lc-components/GroupTree/index.less +12 -0
- package/es/lowcode/view/lc-components/GroupTree/meta.json +83 -0
- package/es/lowcode/view/lc-components/Iframe/index.js +57 -7
- package/es/lowcode/view/lc-components/Iframe/meta.json +3 -4
- package/es/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/es/lowcode/view/lc-components/Image/index.js +82 -6
- package/es/lowcode/view/lc-components/Image/index.less +27 -0
- package/es/lowcode/view/lc-components/Image/meta.json +51 -16
- package/es/lowcode/view/lc-components/Link/index.js +53 -5
- package/es/lowcode/view/lc-components/Link/index.less +15 -0
- package/es/lowcode/view/lc-components/Link/meta.json +9 -9
- package/es/lowcode/view/lc-components/Table/index.js +5 -6
- package/es/lowcode/view/lc-components/Table/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +40 -4
- package/es/lowcode/view/lc-components/Tabs/index.js +1 -1
- package/es/lowcode/view/lc-components/Tabs/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tree/index.js +21 -19
- package/es/lowcode/view/lc-components/Tree/meta.json +2 -2
- package/es/utils/grid.js +3 -3
- package/lib/components/LDActions/index.less +3 -1
- package/lib/components/LdAutoForm/index.js +2 -1
- package/lib/components/LdCard/index.js +153 -66
- package/lib/components/LdFormList/index.js +19 -5
- package/lib/components/LdGridForm/index.js +40 -24
- package/lib/components/LdTree/index.js +14 -8
- package/lib/components/LdTree/index.less +4 -2
- package/lib/helper/ldBuilder.js +2 -2
- package/lib/locales/zh-CN.js +13 -4
- package/lib/lowcode/constants/index.js +1 -1
- package/lib/lowcode/engine/meta/cardlist.props.default.json +27 -6
- package/lib/lowcode/engine/meta/cardlist.props.json +254 -72
- package/lib/lowcode/engine/meta/components-list.json +6 -102
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
- package/lib/lowcode/engine/meta/dialog.props.json +74 -18
- package/lib/lowcode/engine/meta/drawer.props.default.json +15 -4
- package/lib/lowcode/engine/meta/drawer.props.json +144 -24
- package/lib/lowcode/engine/meta/form.props.default.json +14 -3
- package/lib/lowcode/engine/meta/form.props.json +49 -9
- package/lib/lowcode/engine/meta/grouptree.props.default.json +16 -0
- package/lib/lowcode/engine/meta/grouptree.props.json +83 -0
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/lib/lowcode/engine/meta/iframe.props.json +3 -4
- package/lib/lowcode/engine/meta/image.props.default.json +3 -2
- package/lib/lowcode/engine/meta/image.props.json +51 -16
- package/lib/lowcode/engine/meta/imex.props.json +1 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +23 -5
- package/lib/lowcode/engine/meta/link.props.default.json +1 -1
- package/lib/lowcode/engine/meta/link.props.json +9 -9
- package/lib/lowcode/engine/meta/table.props.json +1 -1
- package/lib/lowcode/engine/meta/tabs.props.default.json +1 -1
- package/lib/lowcode/engine/meta/tabs.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.json +2 -2
- package/lib/lowcode/engine/provider/ContextProvider/index.js +6 -2
- package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +83 -3
- package/lib/lowcode/engine/tools/helper.js +22 -0
- package/lib/lowcode/engine/tools/useCanvasRender.js +13 -1
- package/lib/lowcode/painter/Components.js +6 -1
- package/lib/lowcode/painter/Design.js +1 -0
- package/lib/lowcode/painter/DesignOperator.js +25 -15
- package/lib/lowcode/painter/DesignToolbar.js +78 -47
- package/lib/lowcode/painter/Ribbon.js +14 -1
- package/lib/lowcode/painter/components/ActionBindModal.js +3 -7
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +142 -35
- package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +27 -4
- package/lib/lowcode/painter/components/DragDrop/Overlay.js +5 -2
- package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
- package/lib/lowcode/painter/components/NumberInput.js +1 -1
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +2 -1
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +29 -1
- package/lib/lowcode/painter/components/field-setting/index.js +26 -12
- package/lib/lowcode/painter/expect.js +34 -0
- package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +19 -1
- package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
- package/lib/lowcode/painter/panel-section/ComplexPop.js +1 -1
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +14 -3
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +2 -2
- package/lib/lowcode/painter/panel-section/GroupClassSelector.js +63 -0
- package/lib/lowcode/painter/panel-section/PageVars.js +1 -1
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +1 -0
- package/lib/lowcode/painter/panel-section/TabItems.js +1 -1
- package/lib/lowcode/painter/panel-section/TableTopFilter.js +3 -3
- package/lib/lowcode/painter/style/action-bind-modal.less +5 -3
- package/lib/lowcode/painter/style/design.less +26 -7
- package/lib/lowcode/painter/style/dragdrop.less +46 -0
- package/lib/lowcode/painter/style/list-editor.less +5 -3
- package/lib/lowcode/painter/style/number-input.less +3 -1
- package/lib/lowcode/painter/style/outline.less +3 -1
- package/lib/lowcode/painter/style/panel-attrs.less +7 -3
- package/lib/lowcode/painter/style/panel.less +9 -7
- package/lib/lowcode/painter/style/radio.less +1 -1
- package/lib/lowcode/painter/style/ribbon.less +4 -2
- package/lib/lowcode/painter/svg/code.svg +3 -0
- package/lib/lowcode/painter/svg/expect.svg +9 -0
- package/lib/lowcode/view/lc-components/CardList/index.js +480 -11
- package/lib/lowcode/view/lc-components/CardList/meta.json +255 -73
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +13 -5
- package/lib/lowcode/view/lc-components/Dialog/index.js +15 -5
- package/lib/lowcode/view/lc-components/Dialog/index.less +4 -0
- package/lib/lowcode/view/lc-components/Dialog/meta.json +72 -18
- package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +52 -8
- package/lib/lowcode/view/lc-components/Drawer/index.js +138 -23
- package/lib/lowcode/view/lc-components/Drawer/index.less +11 -8
- package/lib/lowcode/view/lc-components/Drawer/meta.json +136 -25
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Form/index.js +44 -27
- package/lib/lowcode/view/lc-components/Form/meta.json +44 -8
- package/lib/lowcode/view/lc-components/GroupTree/FunctionDesign.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/GroupTree/index.js +220 -0
- package/lib/lowcode/view/lc-components/GroupTree/index.less +12 -0
- package/lib/lowcode/view/lc-components/GroupTree/meta.json +83 -0
- package/lib/lowcode/view/lc-components/Iframe/index.js +55 -5
- package/lib/lowcode/view/lc-components/Iframe/meta.json +3 -4
- package/lib/lowcode/view/lc-components/ImEx/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Image/index.js +80 -4
- package/lib/lowcode/view/lc-components/Image/index.less +27 -0
- package/lib/lowcode/view/lc-components/Image/meta.json +51 -16
- package/lib/lowcode/view/lc-components/Link/index.js +52 -4
- package/lib/lowcode/view/lc-components/Link/index.less +15 -0
- package/lib/lowcode/view/lc-components/Link/meta.json +9 -9
- package/lib/lowcode/view/lc-components/Table/index.js +5 -6
- package/lib/lowcode/view/lc-components/Table/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +38 -2
- package/lib/lowcode/view/lc-components/Tabs/index.js +1 -1
- package/lib/lowcode/view/lc-components/Tabs/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +20 -18
- package/lib/lowcode/view/lc-components/Tree/meta.json +2 -2
- package/lib/utils/grid.js +2 -2
- package/package.json +10 -9
- package/es/lowcode/painter/style/treedragdrop.less +0 -19
- package/es/lowcode/view/lc-components/Form/index.less +0 -5
- package/lib/lowcode/painter/style/treedragdrop.less +0 -19
- package/lib/lowcode/view/lc-components/Form/index.less +0 -5
|
@@ -1,23 +1,66 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "className", "
|
|
5
|
-
import React from 'react';
|
|
5
|
+
var _excluded = ["id", "children", "className", "defaultOpen"];
|
|
6
|
+
import React, { useRef, useEffect, useImperativeHandle } from 'react';
|
|
7
|
+
import { useCreation } from 'ahooks';
|
|
6
8
|
import Index from "./index";
|
|
7
9
|
import classNames from 'classnames';
|
|
8
|
-
import
|
|
10
|
+
import { suid } from '@luck-design-biz/base/utils';
|
|
11
|
+
import { useContext, addNode } from "../../../engine/provider/ContextProvider";
|
|
12
|
+
import "./index.less";
|
|
13
|
+
import boxDefaultMeta from "../../../engine/meta/box.props.default.json";
|
|
9
14
|
var FunctionDesign = function FunctionDesign(_ref) {
|
|
10
|
-
var
|
|
15
|
+
var id = _ref.id,
|
|
16
|
+
children = _ref.children,
|
|
11
17
|
className = _ref.className,
|
|
12
|
-
|
|
18
|
+
defaultOpen = _ref.defaultOpen,
|
|
13
19
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var apiRef = useRef();
|
|
21
|
+
var ctx = useContext();
|
|
22
|
+
useImperativeHandle(apiRef, function () {
|
|
23
|
+
return {
|
|
24
|
+
doOpen: function doOpen() {
|
|
25
|
+
var _self = ctx.componentMap.get(id).api.getSelfDom();
|
|
26
|
+
_self.closest('#design-workspace').style.overflow = 'hidden';
|
|
27
|
+
_self.closest('.ant-drawer').style.display = 'block';
|
|
28
|
+
},
|
|
29
|
+
doClose: function doClose() {
|
|
30
|
+
var _self = ctx.componentMap.get(id).api.getSelfDom();
|
|
31
|
+
_self.closest('#design-workspace').style.overflow = '';
|
|
32
|
+
_self.closest('.ant-drawer').style.display = 'none';
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}, []);
|
|
36
|
+
useEffect(function () {
|
|
37
|
+
if (defaultOpen) {
|
|
38
|
+
ctx.componentMap.get(id).api.getSelfDom().closest('#design-workspace').style.overflow = 'hidden';
|
|
39
|
+
}
|
|
40
|
+
}, [defaultOpen]);
|
|
41
|
+
useCreation(function () {
|
|
42
|
+
if (children !== null && children !== void 0 && children.length) return;
|
|
43
|
+
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
44
|
+
var compId = _ref2.id;
|
|
45
|
+
if (compId !== id) return;
|
|
46
|
+
addNode(id, "box_".concat(suid()), _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
|
|
47
|
+
buildIn: true
|
|
48
|
+
}));
|
|
49
|
+
}).watch();
|
|
50
|
+
}, []);
|
|
14
51
|
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
15
|
-
|
|
52
|
+
id: id,
|
|
53
|
+
className: classNames('runtime-design', _defineProperty({}, className, !!className)),
|
|
16
54
|
getContainer: false,
|
|
17
|
-
show: show,
|
|
18
55
|
style: {
|
|
19
56
|
position: 'absolute'
|
|
20
57
|
}
|
|
21
|
-
}, props
|
|
58
|
+
}, props, {
|
|
59
|
+
$apiRef: apiRef,
|
|
60
|
+
$designProps: {
|
|
61
|
+
visible: true,
|
|
62
|
+
zIndex: 10
|
|
63
|
+
}
|
|
64
|
+
}), children);
|
|
22
65
|
};
|
|
23
66
|
export default FunctionDesign;
|
|
@@ -1,31 +1,97 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
5
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
2
6
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import { useMemoizedFn, useBoolean } from 'ahooks';
|
|
7
|
-
import { Drawer } from 'luck-design/antd';
|
|
7
|
+
import React, { useRef, useEffect, useState, useImperativeHandle } from 'react';
|
|
8
|
+
import { useMemoizedFn, useUpdateEffect } from 'ahooks';
|
|
9
|
+
import { Drawer, Button } from 'luck-design/antd';
|
|
8
10
|
import classNames from 'classnames';
|
|
11
|
+
import styled from 'styled-components';
|
|
12
|
+
import { isNil } from 'lodash';
|
|
9
13
|
import Wrapper from "../Wrapper";
|
|
14
|
+
import { LDActions } from "../../../../index";
|
|
15
|
+
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
16
|
+
import usePromiseState from "../../../engine/tools/usePromiseState";
|
|
10
17
|
import { omitBadProps } from "../../../engine/tools/helper";
|
|
11
18
|
import defaultMeta from "../../../engine/meta/drawer.props.default.json";
|
|
12
19
|
import styles from "./index.less";
|
|
20
|
+
var Footer = styled.div.withConfig({
|
|
21
|
+
displayName: "Footer",
|
|
22
|
+
componentId: "luckda-6530__sc-79l6vu-0"
|
|
23
|
+
})(["position:absolute;right:0;bottom:0;width:100%;display:flex;justify-content:flex-end;border-top:1px solid #e9e9e9;padding:10px 16px;background:#fff;text-align:right;"]);
|
|
13
24
|
var LCDrawer = function LCDrawer(_ref) {
|
|
14
25
|
var id = _ref.id,
|
|
15
26
|
children = _ref.children,
|
|
27
|
+
title = _ref.title,
|
|
28
|
+
width = _ref.width,
|
|
29
|
+
height = _ref.height,
|
|
30
|
+
padding = _ref.padding,
|
|
16
31
|
className = _ref.className,
|
|
17
32
|
getContainer = _ref.getContainer,
|
|
33
|
+
defaultOpen = _ref.defaultOpen,
|
|
34
|
+
mask = _ref.mask,
|
|
35
|
+
closable = _ref.closable,
|
|
18
36
|
style = _ref.style,
|
|
19
|
-
|
|
37
|
+
closeType = _ref.closeType,
|
|
38
|
+
placement = _ref.placement,
|
|
39
|
+
destroyOnClose = _ref.destroyOnClose,
|
|
40
|
+
header = _ref.header,
|
|
41
|
+
footer = _ref.footer,
|
|
42
|
+
okText = _ref.okText,
|
|
43
|
+
cancelText = _ref.cancelText,
|
|
44
|
+
btnGroup = _ref.btnGroup,
|
|
45
|
+
advance = _ref.advance,
|
|
46
|
+
$apiRef = _ref.$apiRef,
|
|
47
|
+
$designProps = _ref.$designProps;
|
|
48
|
+
var ctx = useContext();
|
|
20
49
|
var apiRef = useRef();
|
|
21
50
|
var domRef = useRef();
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
open =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
51
|
+
var _usePromiseState = usePromiseState(defaultOpen),
|
|
52
|
+
_usePromiseState2 = _slicedToArray(_usePromiseState, 2),
|
|
53
|
+
open = _usePromiseState2[0],
|
|
54
|
+
setOpen = _usePromiseState2[1];
|
|
55
|
+
var _useState = useState(false),
|
|
56
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
+
loading = _useState2[0],
|
|
58
|
+
setLoading = _useState2[1];
|
|
59
|
+
var _usePromiseState3 = usePromiseState(title),
|
|
60
|
+
_usePromiseState4 = _slicedToArray(_usePromiseState3, 2),
|
|
61
|
+
_title = _usePromiseState4[0],
|
|
62
|
+
_setTitle = _usePromiseState4[1];
|
|
63
|
+
useEffect(function () {
|
|
64
|
+
ctx.doAction(advance.events.onMount);
|
|
65
|
+
return function () {
|
|
66
|
+
_setTitle(title);
|
|
67
|
+
ctx.doAction(advance.events.onUnmount);
|
|
68
|
+
};
|
|
69
|
+
}, []);
|
|
70
|
+
useUpdateEffect(function () {
|
|
71
|
+
if (open) {
|
|
72
|
+
ctx.doAction(advance.events.onOpen);
|
|
73
|
+
} else {
|
|
74
|
+
ctx.doAction(advance.events.onClose);
|
|
75
|
+
}
|
|
76
|
+
}, [open]);
|
|
77
|
+
useUpdateEffect(function () {
|
|
78
|
+
_setTitle(title);
|
|
79
|
+
}, [title]);
|
|
80
|
+
var handleOk = useMemoizedFn( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
81
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
82
|
+
while (1) switch (_context.prev = _context.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
setLoading(true);
|
|
85
|
+
_context.next = 3;
|
|
86
|
+
return ctx.doAction(advance.events.onOk);
|
|
87
|
+
case 3:
|
|
88
|
+
setLoading(false);
|
|
89
|
+
case 4:
|
|
90
|
+
case "end":
|
|
91
|
+
return _context.stop();
|
|
92
|
+
}
|
|
93
|
+
}, _callee);
|
|
94
|
+
})));
|
|
29
95
|
var getTargetDom = useMemoizedFn(function () {
|
|
30
96
|
var _domRef$current;
|
|
31
97
|
return (_domRef$current = domRef.current) === null || _domRef$current === void 0 ? void 0 : _domRef$current.closest('.ant-drawer-content-wrapper');
|
|
@@ -33,7 +99,7 @@ var LCDrawer = function LCDrawer(_ref) {
|
|
|
33
99
|
useImperativeHandle(apiRef, function () {
|
|
34
100
|
return {
|
|
35
101
|
/**
|
|
36
|
-
*
|
|
102
|
+
* 弹窗打开状态
|
|
37
103
|
* @property
|
|
38
104
|
*/
|
|
39
105
|
open: open,
|
|
@@ -41,30 +107,62 @@ var LCDrawer = function LCDrawer(_ref) {
|
|
|
41
107
|
* 打开弹窗
|
|
42
108
|
* @method
|
|
43
109
|
*/
|
|
44
|
-
doOpen:
|
|
110
|
+
doOpen: function doOpen() {
|
|
111
|
+
return setOpen(true);
|
|
112
|
+
},
|
|
45
113
|
/**
|
|
46
114
|
* 关闭弹窗
|
|
47
115
|
* @method
|
|
48
116
|
*/
|
|
49
|
-
doClose:
|
|
117
|
+
doClose: function doClose() {
|
|
118
|
+
return setOpen(false);
|
|
119
|
+
},
|
|
50
120
|
/**
|
|
121
|
+
* 设置弹窗标题
|
|
51
122
|
* @method
|
|
52
|
-
*
|
|
123
|
+
* @param {stirng} title -标题
|
|
53
124
|
*/
|
|
54
|
-
|
|
125
|
+
setTitle: function setTitle(_title) {
|
|
126
|
+
return _setTitle(_title);
|
|
127
|
+
}
|
|
55
128
|
};
|
|
56
129
|
});
|
|
57
130
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
58
131
|
id: id,
|
|
59
132
|
displayName: "Drawer",
|
|
60
133
|
getTargetDom: getTargetDom,
|
|
61
|
-
api: apiRef
|
|
62
|
-
}, /*#__PURE__*/React.createElement(Drawer, {
|
|
134
|
+
api: $apiRef || apiRef
|
|
135
|
+
}, /*#__PURE__*/React.createElement(Drawer, _extends({
|
|
136
|
+
title: _title,
|
|
63
137
|
visible: open,
|
|
64
|
-
|
|
138
|
+
width: width,
|
|
139
|
+
height: height,
|
|
140
|
+
mask: mask,
|
|
141
|
+
closable: closable,
|
|
65
142
|
style: style,
|
|
66
|
-
|
|
67
|
-
|
|
143
|
+
headerStyle: _objectSpread({
|
|
144
|
+
position: 'sticky',
|
|
145
|
+
top: 0,
|
|
146
|
+
left: 0,
|
|
147
|
+
zIndex: 10
|
|
148
|
+
}, header ? null : {
|
|
149
|
+
display: 'none'
|
|
150
|
+
}),
|
|
151
|
+
bodyStyle: {
|
|
152
|
+
padding: padding
|
|
153
|
+
},
|
|
154
|
+
maskClosable: !!(closeType !== null && closeType !== void 0 && closeType.includes('maskClosable')),
|
|
155
|
+
keyboard: !!(closeType !== null && closeType !== void 0 && closeType.includes('keyboard')),
|
|
156
|
+
placement: placement,
|
|
157
|
+
destroyOnClose: destroyOnClose,
|
|
158
|
+
onClose: function onClose() {
|
|
159
|
+
return setOpen(false);
|
|
160
|
+
},
|
|
161
|
+
getContainer: isNil(getContainer) ? function () {
|
|
162
|
+
return document.getElementById('root') || document.getElementById('react-content') || document.body;
|
|
163
|
+
} : getContainer,
|
|
164
|
+
className: classNames(_defineProperty({}, className, !!className))
|
|
165
|
+
}, $designProps), /*#__PURE__*/React.createElement("div", {
|
|
68
166
|
style: {
|
|
69
167
|
height: 0,
|
|
70
168
|
width: 0,
|
|
@@ -73,7 +171,24 @@ var LCDrawer = function LCDrawer(_ref) {
|
|
|
73
171
|
visibility: 'hidden'
|
|
74
172
|
},
|
|
75
173
|
ref: domRef
|
|
76
|
-
}), /*#__PURE__*/React.createElement(
|
|
174
|
+
}), children, footer ? /*#__PURE__*/React.createElement(Footer, {
|
|
175
|
+
className: "ant-drawer-footer"
|
|
176
|
+
}, /*#__PURE__*/React.createElement(LDActions, _extends({}, btnGroup, {
|
|
177
|
+
doAction: function doAction(action) {
|
|
178
|
+
return ctx.doAction(action);
|
|
179
|
+
}
|
|
180
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
181
|
+
onClick: function onClick() {
|
|
182
|
+
return setOpen(false);
|
|
183
|
+
},
|
|
184
|
+
style: {
|
|
185
|
+
margin: '0px 8px'
|
|
186
|
+
}
|
|
187
|
+
}, cancelText), /*#__PURE__*/React.createElement(Button, {
|
|
188
|
+
type: "primary",
|
|
189
|
+
loading: loading,
|
|
190
|
+
onClick: handleOk
|
|
191
|
+
}, okText)) : null));
|
|
77
192
|
};
|
|
78
193
|
LCDrawer.defaultProps = omitBadProps(defaultMeta);
|
|
79
194
|
export default LCDrawer;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
:global {
|
|
2
|
+
.runtime-design {
|
|
3
|
+
position: absolute !important;
|
|
4
|
+
|
|
5
|
+
.ant-drawer-content-wrapper {
|
|
6
|
+
transition: none !important;
|
|
7
|
+
transform: none !important;
|
|
6
8
|
}
|
|
7
|
-
}
|
|
8
|
-
.
|
|
9
|
+
}
|
|
10
|
+
div.ant-drawer.runtime-design {
|
|
9
11
|
display: none;
|
|
10
|
-
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"props": [
|
|
10
10
|
{
|
|
11
11
|
"key": "id",
|
|
12
|
-
"
|
|
12
|
+
"name": "唯一标识",
|
|
13
13
|
"type": "string",
|
|
14
14
|
"disabled": true
|
|
15
15
|
},
|
|
@@ -20,46 +20,134 @@
|
|
|
20
20
|
"type": "_I18nInput",
|
|
21
21
|
"default": "抽屉"
|
|
22
22
|
},
|
|
23
|
-
|
|
23
|
+
{
|
|
24
24
|
"key": "width",
|
|
25
25
|
"name": "宽度",
|
|
26
|
-
"desc": "
|
|
27
|
-
"type": "
|
|
28
|
-
"
|
|
26
|
+
"desc": "抽屉的宽度(仅在弹出位置为左侧和右侧时有效)",
|
|
27
|
+
"type": "_WidthHeight",
|
|
28
|
+
"options": [
|
|
29
|
+
{
|
|
30
|
+
"label": "px",
|
|
31
|
+
"value": "px"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"label": "%",
|
|
35
|
+
"value": "%"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"label": "vw",
|
|
39
|
+
"value": "vw"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"label": "A",
|
|
43
|
+
"value": "auto"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"default": "420px"
|
|
29
47
|
},
|
|
30
48
|
{
|
|
31
49
|
"key": "height",
|
|
32
50
|
"name": "高度",
|
|
33
|
-
"desc": "
|
|
34
|
-
"type": "
|
|
35
|
-
"
|
|
51
|
+
"desc": "抽屉的高度(仅在弹出位置为顶部和底部时有效)",
|
|
52
|
+
"type": "_WidthHeight",
|
|
53
|
+
"options": [
|
|
54
|
+
{
|
|
55
|
+
"label": "px",
|
|
56
|
+
"value": "px"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"label": "%",
|
|
60
|
+
"value": "%"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"label": "vw",
|
|
64
|
+
"value": "vw"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"label": "A",
|
|
68
|
+
"value": "auto"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"default": "256px"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"key": "padding",
|
|
75
|
+
"name": "内边距",
|
|
76
|
+
"type": "select",
|
|
77
|
+
"options": [
|
|
78
|
+
{
|
|
79
|
+
"label": "大(24px)",
|
|
80
|
+
"value": 24
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"label": "中(16px)",
|
|
84
|
+
"value": 16
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"label": "小(8px)",
|
|
88
|
+
"value": 8
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"label": "无(0px)",
|
|
92
|
+
"value": 0
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"default": 16
|
|
36
96
|
},
|
|
37
97
|
{
|
|
38
98
|
"key": "defaultOpen",
|
|
39
99
|
"name": "默认显示",
|
|
40
|
-
"
|
|
41
|
-
"type": "boolean",
|
|
100
|
+
"type": "switch",
|
|
42
101
|
"default": false
|
|
43
102
|
},
|
|
103
|
+
{
|
|
104
|
+
"key": "header",
|
|
105
|
+
"name": "显示Header",
|
|
106
|
+
"type": "switch",
|
|
107
|
+
"default": true
|
|
108
|
+
},
|
|
44
109
|
{
|
|
45
110
|
"key": "mask",
|
|
46
111
|
"name": "显示遮罩",
|
|
47
112
|
"desc": "是否展示遮罩",
|
|
48
|
-
"type": "
|
|
49
|
-
"default":
|
|
113
|
+
"type": "switch",
|
|
114
|
+
"default": true
|
|
50
115
|
},
|
|
51
116
|
{
|
|
52
|
-
"key": "
|
|
53
|
-
"name": "
|
|
54
|
-
"desc": "
|
|
55
|
-
"type": "
|
|
117
|
+
"key": "closable",
|
|
118
|
+
"name": "关闭按钮",
|
|
119
|
+
"desc": "是否显示右上角的关闭按钮",
|
|
120
|
+
"type": "switch",
|
|
56
121
|
"default": true
|
|
57
122
|
},
|
|
123
|
+
{
|
|
124
|
+
"key": "destroyOnClose",
|
|
125
|
+
"name": "关闭销毁",
|
|
126
|
+
"desc": "关闭时销毁对话框里的子元素",
|
|
127
|
+
"type": "switch",
|
|
128
|
+
"default": false
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"key": "closeType",
|
|
132
|
+
"name": "关闭方式",
|
|
133
|
+
"type": "checkbox",
|
|
134
|
+
"options": [
|
|
135
|
+
{
|
|
136
|
+
"label": "点击遮罩",
|
|
137
|
+
"value": "maskClosable"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"label": "ESC",
|
|
141
|
+
"value": "keyboard"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"defaultValue": ["maskClosable"]
|
|
145
|
+
},
|
|
58
146
|
{
|
|
59
147
|
"key": "placement",
|
|
60
148
|
"name": "弹出位置",
|
|
61
149
|
"desc": "抽屉的方向",
|
|
62
|
-
"type": "
|
|
150
|
+
"type": "segmented",
|
|
63
151
|
"options": [
|
|
64
152
|
{
|
|
65
153
|
"label": "顶部",
|
|
@@ -78,20 +166,43 @@
|
|
|
78
166
|
"value": "left"
|
|
79
167
|
}
|
|
80
168
|
],
|
|
81
|
-
"default": "right"
|
|
169
|
+
"default": "right",
|
|
170
|
+
"repositioning": true
|
|
82
171
|
},
|
|
83
172
|
{
|
|
84
|
-
"key": "
|
|
85
|
-
"name": "
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
|
|
173
|
+
"key": "footerSetting",
|
|
174
|
+
"name": "底部按钮配置",
|
|
175
|
+
"type": "group",
|
|
176
|
+
"props": [
|
|
177
|
+
{
|
|
178
|
+
"key": "footer",
|
|
179
|
+
"name": "显示footer",
|
|
180
|
+
"desc": "是否显示底部按钮区域",
|
|
181
|
+
"type": "switch",
|
|
182
|
+
"default": true
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"key": "okText",
|
|
186
|
+
"name": "确认文字",
|
|
187
|
+
"type": "_I18nInput",
|
|
188
|
+
"default": "确定"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"key": "cancelText",
|
|
192
|
+
"name": "取消文字",
|
|
193
|
+
"type": "_I18nInput",
|
|
194
|
+
"default": "取消"
|
|
195
|
+
}
|
|
196
|
+
]
|
|
89
197
|
},
|
|
90
198
|
{
|
|
91
199
|
"key": "btnGroup",
|
|
92
200
|
"name": "按钮组",
|
|
93
|
-
"desc": "
|
|
94
|
-
"type": "
|
|
201
|
+
"desc": "底部按钮区域的按钮组",
|
|
202
|
+
"type": "_ActionsEditor",
|
|
203
|
+
"default": { "display": "button", "max": 2, "moreText": "操作", "todoList": [] },
|
|
204
|
+
"wrapper": "collapse",
|
|
205
|
+
"wrapperProps": { "suppressIcon": true }
|
|
95
206
|
}
|
|
96
207
|
],
|
|
97
208
|
"advance": {
|
|
@@ -94,7 +94,8 @@ var FunctionDesign = function FunctionDesign(_ref) {
|
|
|
94
94
|
formMode: 'update',
|
|
95
95
|
ticketData: _defineProperty({}, window.appConfig.constraintKeys.PRIMARY, 'test')
|
|
96
96
|
},
|
|
97
|
-
ref: ref
|
|
97
|
+
ref: ref,
|
|
98
|
+
affixBarZIndex: 10
|
|
98
99
|
}), children);
|
|
99
100
|
};
|
|
100
101
|
export default FunctionDesign;
|
|
@@ -7,7 +7,7 @@ var _excluded = ["advance", "state", "render"];
|
|
|
7
7
|
import React, { useRef, forwardRef, Fragment, useImperativeHandle } from 'react';
|
|
8
8
|
import { useMemoizedFn, useCreation, useUnmount } from 'ahooks';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
|
-
import { reduce, includes, isNil, cloneDeep, last, startsWith, isString } from 'lodash';
|
|
10
|
+
import { reduce, includes, isNil, cloneDeep, last, startsWith, isString, xor } from 'lodash';
|
|
11
11
|
import { BasicDivider } from 'luck-design';
|
|
12
12
|
import { Collapse } from '@luck-design-biz/base';
|
|
13
13
|
import { formatMessage, getPageQuery } from '@luck-design-biz/base/utils';
|
|
@@ -20,7 +20,6 @@ import RuntimeComp from "../JSX/RuntimeComp";
|
|
|
20
20
|
import useCombinedRefs from "../../../engine/tools/useCombinedRefs";
|
|
21
21
|
import defaultMeta from "../../../engine/meta/form.props.default.json";
|
|
22
22
|
import { RUNTIME } from "../../../constants";
|
|
23
|
-
import styles from "./index.less";
|
|
24
23
|
var _I18N_PREFIX_ = 'lc.form.validator';
|
|
25
24
|
var Header = function Header(_ref2) {
|
|
26
25
|
var _ref2$header = _ref2.header,
|
|
@@ -56,7 +55,7 @@ var getMthodParams = function getMthodParams(methodStr) {
|
|
|
56
55
|
return [];
|
|
57
56
|
};
|
|
58
57
|
var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
59
|
-
var _ctx$state2
|
|
58
|
+
var _ctx$state2;
|
|
60
59
|
var id = _ref3.id,
|
|
61
60
|
className = _ref3.className,
|
|
62
61
|
blocks = _ref3.blocks,
|
|
@@ -65,6 +64,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
65
64
|
readOnly = _ref3.readOnly,
|
|
66
65
|
showSave = _ref3.showSave,
|
|
67
66
|
saveTitle = _ref3.saveTitle,
|
|
67
|
+
affixBarZIndex = _ref3.affixBarZIndex,
|
|
68
68
|
getContainer = _ref3.getContainer,
|
|
69
69
|
settingLayout = _ref3.settingLayout,
|
|
70
70
|
renderFormLeft = _ref3.renderFormLeft,
|
|
@@ -110,12 +110,17 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
110
110
|
* 提交表格数据
|
|
111
111
|
* @method
|
|
112
112
|
*/
|
|
113
|
-
submit: function submit() {
|
|
114
|
-
return new Promise(function (resolve) {
|
|
113
|
+
submit: function submit(_formMode) {
|
|
114
|
+
return new Promise(function (resolve, reject) {
|
|
115
115
|
var _ctx$state;
|
|
116
|
-
promiseRef.current =
|
|
116
|
+
promiseRef.current = {
|
|
117
|
+
resolve: resolve,
|
|
118
|
+
reject: reject
|
|
119
|
+
};
|
|
117
120
|
var instance = formRef.current;
|
|
118
|
-
var _ref5 =
|
|
121
|
+
var _ref5 = _formMode ? {
|
|
122
|
+
formMode: _formMode
|
|
123
|
+
} : ((_ctx$state = ctx.state) === null || _ctx$state === void 0 ? void 0 : _ctx$state[id]) || initData || _initData || {},
|
|
119
124
|
formMode = _ref5.formMode;
|
|
120
125
|
if (formMode === 'add') {
|
|
121
126
|
instance.onAdd();
|
|
@@ -406,21 +411,29 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
406
411
|
};
|
|
407
412
|
if (item.type === 'auto') data = _objectSpread(_objectSpread({}, data), {}, {
|
|
408
413
|
col: item.cols
|
|
409
|
-
});else
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
414
|
+
});else {
|
|
415
|
+
data = _objectSpread(_objectSpread({}, data), {}, {
|
|
416
|
+
suppressPreset: item.suppressPreset,
|
|
417
|
+
height: item.height,
|
|
418
|
+
bordered: item.bordered,
|
|
419
|
+
draggable: item.draggable,
|
|
420
|
+
orderByAdd: item.orderByAdd,
|
|
421
|
+
hideActionsColumn: item.suppressActions,
|
|
422
|
+
actionsWidth: item.actionsColumnWidth,
|
|
423
|
+
operates: item.operates ? function (ops) {
|
|
424
|
+
return xor(ops, xor(['add', 'delete', 'update'], item.operates));
|
|
425
|
+
} : null,
|
|
426
|
+
columnsReset: function columnsReset(columns) {
|
|
427
|
+
return handleColumnsReset(item.columnsReset, columns);
|
|
428
|
+
},
|
|
429
|
+
onGridFormReady: function onGridFormReady(_ref, params, gridForm) {
|
|
430
|
+
return handleGridFormReady(item.onGridFormReady, _ref, params, gridForm);
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
if (item.suppressbatch) {
|
|
434
|
+
data.rowSelection = false;
|
|
422
435
|
}
|
|
423
|
-
}
|
|
436
|
+
}
|
|
424
437
|
if (item.actionsColumnReset) data = _objectSpread(_objectSpread({}, data), {}, {
|
|
425
438
|
resetActionsColumn: function resetActionsColumn(data, index, actions, params) {
|
|
426
439
|
return handleResetActionsColumn(item.actionsColumnReset, data, index, actions, params);
|
|
@@ -555,7 +568,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
555
568
|
wrapperRef: wrapperRef,
|
|
556
569
|
id: id,
|
|
557
570
|
ldId: id,
|
|
558
|
-
className: classNames(
|
|
571
|
+
className: classNames('lc-component-form', _defineProperty({}, className, !!className)),
|
|
559
572
|
renderFormList: renderFormList,
|
|
560
573
|
renderFormExtra: renderFormExtra,
|
|
561
574
|
mainFormLdId: "block_main",
|
|
@@ -565,6 +578,7 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
565
578
|
showSaveBtn: showSave,
|
|
566
579
|
saveBtnTitle: saveTitle,
|
|
567
580
|
affixLayout: settingLayout,
|
|
581
|
+
affixBarZIndex: affixBarZIndex,
|
|
568
582
|
renderAffixLeft: function renderAffixLeft() {
|
|
569
583
|
return renderAffix(renderFormLeft);
|
|
570
584
|
},
|
|
@@ -577,15 +591,18 @@ var LCForm = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
577
591
|
onChildChange: onChildChange,
|
|
578
592
|
setVerifyRules: setVerifyRules,
|
|
579
593
|
getContainer: isNil(getContainer) ? null : ctx.componentMap.get(getContainer).api.getSelfDom,
|
|
580
|
-
afterSubmitLoading: function afterSubmitLoading() {
|
|
594
|
+
afterSubmitLoading: function afterSubmitLoading(res) {
|
|
581
595
|
var _promiseRef$current;
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
return (_promiseRef$current = promiseRef.current) === null || _promiseRef$current === void 0 ? void 0 : _promiseRef$current.call.apply(_promiseRef$current, [promiseRef].concat(rest));
|
|
596
|
+
(_promiseRef$current = promiseRef.current) === null || _promiseRef$current === void 0 || _promiseRef$current.resolve(res);
|
|
597
|
+
promiseRef.current = null;
|
|
586
598
|
},
|
|
587
599
|
afterInit: afterInit,
|
|
588
|
-
validateErrorCallback: (
|
|
600
|
+
validateErrorCallback: function validateErrorCallback() {
|
|
601
|
+
var _promiseRef$current2;
|
|
602
|
+
(_promiseRef$current2 = promiseRef.current) === null || _promiseRef$current2 === void 0 || _promiseRef$current2.reject();
|
|
603
|
+
promiseRef.current = null;
|
|
604
|
+
},
|
|
605
|
+
showConfigBtn: false
|
|
589
606
|
}));
|
|
590
607
|
});
|
|
591
608
|
LCForm.defaultProps = omitBadProps(defaultMeta);
|