@luck-design-biz/luckda 0.0.25-6 → 0.0.25-8
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.js +8 -10
- package/es/components/LDActions/index.less +7 -4
- package/es/components/LdAutoForm/index.js +26 -8
- package/es/components/LdFormList/index.js +37 -22
- package/es/components/LdGrid/index.js +14 -7
- package/es/components/LdGridForm/index.js +18 -6
- package/es/components/LdTree/index.js +33 -15
- package/es/helper/form.js +15 -8
- package/es/locales/zh-CN.js +16 -10
- package/es/lowcode/constants/api-url.js +120 -32
- package/es/lowcode/constants/event-topics.js +2 -0
- package/es/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -2
- package/es/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +4 -2
- package/es/lowcode/engine/meta/box.props.json +3 -3
- package/es/lowcode/engine/meta/button.props.json +3 -3
- package/es/lowcode/engine/meta/components-list.json +6 -0
- package/es/lowcode/engine/meta/dialog.props.default.json +10 -5
- package/es/lowcode/engine/meta/dialog.props.json +72 -42
- package/es/lowcode/engine/meta/drawer.props.json +8 -20
- package/es/lowcode/engine/meta/form.props.json +16 -10
- package/es/lowcode/engine/meta/imex.props.default.json +8 -1
- package/es/lowcode/engine/meta/imex.props.json +54 -22
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +53 -3
- package/es/lowcode/engine/meta/layout.props.json +2 -2
- package/es/lowcode/engine/meta/page.props.json +2 -2
- package/es/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/es/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/es/lowcode/engine/meta/section.props.json +2 -2
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +4 -4
- package/es/lowcode/engine/meta/table.props.json +17 -11
- package/es/lowcode/engine/meta/tabs.props.json +3 -3
- package/es/lowcode/engine/meta/tree.props.default.json +2 -0
- package/es/lowcode/engine/meta/tree.props.json +62 -6
- package/es/lowcode/engine/provider/ContextProvider/index.js +20 -43
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +69 -24
- package/es/lowcode/engine/tools/dataProcess.js +4 -0
- package/es/lowcode/engine/tools/helper.js +2 -3
- package/es/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/es/lowcode/engine/tools/usePageDataStore.js +176 -0
- package/es/lowcode/engine/tools/usePromiseState.js +12 -23
- package/es/lowcode/engine/tools/useTodo.js +20 -10
- package/es/lowcode/painter/DesignOperator.js +12 -23
- package/es/lowcode/painter/DesignToolbar.js +10 -45
- package/es/lowcode/painter/Outline.js +2 -4
- package/es/lowcode/painter/Panel.js +29 -28
- package/es/lowcode/painter/components/ActionBindModal.js +30 -24
- package/es/lowcode/painter/components/AdvancePanel.js +6 -1
- package/es/lowcode/painter/components/AttrsPanel.js +38 -29
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
- package/es/lowcode/painter/components/field-setting/CheckFrontRules.js +108 -0
- package/es/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/es/lowcode/painter/components/field-setting/FieldRulesModal.js +33 -13
- package/es/lowcode/painter/components/field-setting/SettingUI.js +162 -30
- package/es/lowcode/painter/components/field-setting/index.js +32 -63
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +53 -0
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +14 -17
- package/es/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/es/lowcode/painter/panel-section/DataSetSelector.js +4 -1
- package/es/lowcode/painter/panel-section/FieldsSetting.js +53 -8
- package/es/lowcode/painter/panel-section/ImpExp.js +93 -6
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +109 -0
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +95 -0
- package/es/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/es/lowcode/painter/panel-section/SplitDisplay.js +25 -110
- package/es/lowcode/painter/panel-section/StylePanel/index.js +10 -4
- package/es/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
- package/es/lowcode/painter/style/action-bind-modal.less +3 -3
- package/es/lowcode/painter/style/design.less +1 -1
- package/es/lowcode/painter/style/page-layout-display.less +28 -0
- package/es/lowcode/painter/style/panel-item.less +1 -1
- package/es/lowcode/painter/style/split-display.less +0 -9
- package/es/lowcode/preview/index.js +4 -2
- package/es/lowcode/view/Canvas.js +6 -7
- package/es/lowcode/view/Page.js +2 -3
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +3 -2
- package/es/lowcode/view/lc-components/Box/meta.json +3 -3
- package/es/lowcode/view/lc-components/Button/index.js +2 -6
- package/es/lowcode/view/lc-components/Button/meta.json +3 -3
- package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +3 -10
- package/es/lowcode/view/lc-components/Dialog/index.js +114 -19
- package/es/lowcode/view/lc-components/Dialog/meta.json +65 -42
- package/es/lowcode/view/lc-components/Drawer/meta.json +8 -20
- package/es/lowcode/view/lc-components/Form/FunctionDesign.js +23 -33
- package/es/lowcode/view/lc-components/Form/FunctionPreview.js +8 -1
- package/es/lowcode/view/lc-components/Form/index.js +113 -21
- package/es/lowcode/view/lc-components/Form/meta.json +16 -10
- package/es/lowcode/view/lc-components/ImEx/FunctionDesign.js +8 -3
- package/es/lowcode/view/lc-components/ImEx/index.js +260 -10
- package/es/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/es/lowcode/view/lc-components/ImEx/meta.json +55 -23
- package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +12 -19
- package/es/lowcode/view/lc-components/Layout/meta.json +2 -2
- package/es/lowcode/view/lc-components/Page/meta.json +2 -2
- package/es/lowcode/view/lc-components/PageContent/index.js +8 -9
- package/es/lowcode/view/lc-components/PageFooter/index.js +2 -5
- package/es/lowcode/view/lc-components/PageHeader/index.js +5 -6
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +63 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionLive.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionPreview.js +10 -0
- package/es/lowcode/view/lc-components/PageLayout/index.js +32 -0
- package/es/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/es/lowcode/view/lc-components/PageModal/index.js +12 -15
- package/es/lowcode/view/lc-components/Section/FunctionDesign.js +3 -9
- package/es/lowcode/view/lc-components/Section/meta.json +2 -2
- package/es/lowcode/view/lc-components/Split/FunctionDesign.js +19 -20
- package/es/lowcode/view/lc-components/Split/index.js +5 -9
- package/es/lowcode/view/lc-components/Split/meta.json +4 -4
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +138 -0
- package/es/lowcode/view/lc-components/Table/index.js +124 -39
- package/es/lowcode/view/lc-components/Table/meta.json +17 -11
- package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +10 -17
- package/es/lowcode/view/lc-components/Tabs/index.js +3 -1
- package/es/lowcode/view/lc-components/Tabs/meta.json +3 -3
- package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -1
- package/es/lowcode/view/lc-components/Tree/index.js +67 -18
- package/es/lowcode/view/lc-components/Tree/meta.json +62 -7
- package/es/lowcode/view/lc-components/Wrapper.js +9 -11
- package/es/services.js +0 -24
- package/es/upload/FilesWall/file.png +0 -0
- package/es/upload/FilesWall/index.js +422 -0
- package/es/upload/FilesWall/index.less +74 -0
- package/es/upload/Form/index.js +2 -1
- package/es/upload/FormItem/index.js +3 -5
- package/es/upload/index.js +2 -1
- package/es/utils/action.js +2 -2
- package/lib/components/LDActions/index.js +7 -9
- package/lib/components/LDActions/index.less +7 -4
- package/lib/components/LdAutoForm/index.js +25 -7
- package/lib/components/LdFormList/index.js +36 -21
- package/lib/components/LdGrid/index.js +14 -7
- package/lib/components/LdGridForm/index.js +16 -4
- package/lib/components/LdTree/index.js +33 -15
- package/lib/helper/form.js +14 -7
- package/lib/locales/zh-CN.js +16 -10
- package/lib/lowcode/constants/api-url.js +123 -32
- package/lib/lowcode/constants/event-topics.js +3 -1
- package/lib/lowcode/engine/factory/panel-item-factory/SelectStrategy.js +4 -2
- package/lib/lowcode/engine/factory/panel-item-factory/SwitchStrategy.js +4 -2
- package/lib/lowcode/engine/meta/box.props.json +3 -3
- package/lib/lowcode/engine/meta/button.props.json +3 -3
- package/lib/lowcode/engine/meta/components-list.json +6 -0
- package/lib/lowcode/engine/meta/dialog.props.default.json +10 -5
- package/lib/lowcode/engine/meta/dialog.props.json +72 -42
- package/lib/lowcode/engine/meta/drawer.props.json +8 -20
- package/lib/lowcode/engine/meta/form.props.json +16 -10
- package/lib/lowcode/engine/meta/imex.props.default.json +8 -1
- package/lib/lowcode/engine/meta/imex.props.json +54 -22
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +53 -3
- package/lib/lowcode/engine/meta/layout.props.json +2 -2
- package/lib/lowcode/engine/meta/page.props.json +2 -2
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +14 -0
- package/lib/lowcode/engine/meta/pagelayout.props.json +47 -0
- package/lib/lowcode/engine/meta/section.props.json +2 -2
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +4 -4
- package/lib/lowcode/engine/meta/table.props.json +17 -11
- package/lib/lowcode/engine/meta/tabs.props.json +3 -3
- package/lib/lowcode/engine/meta/tree.props.default.json +2 -0
- package/lib/lowcode/engine/meta/tree.props.json +62 -6
- package/lib/lowcode/engine/provider/ContextProvider/index.js +36 -43
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +68 -23
- package/lib/lowcode/engine/tools/dataProcess.js +4 -0
- package/lib/lowcode/engine/tools/helper.js +2 -3
- package/lib/lowcode/engine/tools/useCanvasRender.js +3 -2
- package/lib/lowcode/engine/tools/usePageDataStore.js +183 -0
- package/lib/lowcode/engine/tools/usePromiseState.js +11 -21
- package/lib/lowcode/engine/tools/useTodo.js +19 -9
- package/lib/lowcode/painter/DesignOperator.js +11 -22
- package/lib/lowcode/painter/DesignToolbar.js +9 -44
- package/lib/lowcode/painter/Outline.js +1 -3
- package/lib/lowcode/painter/Panel.js +28 -27
- package/lib/lowcode/painter/components/ActionBindModal.js +28 -22
- package/lib/lowcode/painter/components/AdvancePanel.js +6 -1
- package/lib/lowcode/painter/components/AttrsPanel.js +37 -28
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +1 -1
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +3 -2
- package/lib/lowcode/painter/components/field-setting/CheckFrontRules.js +116 -0
- package/lib/lowcode/painter/components/field-setting/CheckRules.js +1 -26
- package/lib/lowcode/painter/components/field-setting/FieldRulesModal.js +34 -13
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +159 -27
- package/lib/lowcode/painter/components/field-setting/index.js +32 -63
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +59 -0
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +13 -16
- package/lib/lowcode/painter/panel-section/ButtonType.js +4 -2
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +4 -1
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +53 -8
- package/lib/lowcode/painter/panel-section/ImpExp.js +92 -5
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +115 -0
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +103 -0
- package/lib/lowcode/painter/panel-section/SerialsSelector.js +4 -2
- package/lib/lowcode/painter/panel-section/SplitDisplay.js +24 -109
- package/lib/lowcode/painter/panel-section/StylePanel/index.js +10 -4
- package/lib/lowcode/painter/panel-section/TreeRootEditor.js +2 -2
- package/lib/lowcode/painter/style/action-bind-modal.less +3 -3
- package/lib/lowcode/painter/style/design.less +1 -1
- package/lib/lowcode/painter/style/page-layout-display.less +28 -0
- package/lib/lowcode/painter/style/panel-item.less +1 -1
- package/lib/lowcode/painter/style/split-display.less +0 -9
- package/lib/lowcode/preview/index.js +4 -2
- package/lib/lowcode/view/Canvas.js +5 -6
- package/lib/lowcode/view/Page.js +2 -3
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +3 -2
- package/lib/lowcode/view/lc-components/Box/meta.json +3 -3
- package/lib/lowcode/view/lc-components/Button/index.js +2 -6
- package/lib/lowcode/view/lc-components/Button/meta.json +3 -3
- package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +2 -9
- package/lib/lowcode/view/lc-components/Dialog/index.js +114 -19
- package/lib/lowcode/view/lc-components/Dialog/meta.json +65 -42
- package/lib/lowcode/view/lc-components/Drawer/meta.json +8 -20
- package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +20 -31
- package/lib/lowcode/view/lc-components/Form/FunctionPreview.js +8 -1
- package/lib/lowcode/view/lc-components/Form/index.js +110 -18
- package/lib/lowcode/view/lc-components/Form/meta.json +16 -10
- package/lib/lowcode/view/lc-components/ImEx/FunctionDesign.js +8 -3
- package/lib/lowcode/view/lc-components/ImEx/index.js +257 -8
- package/lib/lowcode/view/lc-components/ImEx/index.less +7 -0
- package/lib/lowcode/view/lc-components/ImEx/meta.json +55 -23
- package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +11 -18
- package/lib/lowcode/view/lc-components/Layout/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Page/meta.json +2 -2
- package/lib/lowcode/view/lc-components/PageContent/index.js +7 -8
- package/lib/lowcode/view/lc-components/PageFooter/index.js +2 -5
- package/lib/lowcode/view/lc-components/PageHeader/index.js +4 -5
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +71 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionLive.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionPreview.js +17 -0
- package/lib/lowcode/view/lc-components/PageLayout/index.js +40 -0
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +47 -0
- package/lib/lowcode/view/lc-components/PageModal/index.js +11 -14
- package/lib/lowcode/view/lc-components/Section/FunctionDesign.js +2 -8
- package/lib/lowcode/view/lc-components/Section/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Split/FunctionDesign.js +19 -20
- package/lib/lowcode/view/lc-components/Split/index.js +2 -6
- package/lib/lowcode/view/lc-components/Split/meta.json +4 -4
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +145 -0
- package/lib/lowcode/view/lc-components/Table/index.js +123 -38
- package/lib/lowcode/view/lc-components/Table/meta.json +17 -11
- package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +11 -18
- package/lib/lowcode/view/lc-components/Tabs/index.js +3 -1
- package/lib/lowcode/view/lc-components/Tabs/meta.json +3 -3
- package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +2 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +65 -16
- package/lib/lowcode/view/lc-components/Tree/meta.json +62 -7
- package/lib/lowcode/view/lc-components/Wrapper.js +8 -10
- package/lib/services.js +0 -25
- package/lib/upload/FilesWall/file.png +0 -0
- package/lib/upload/FilesWall/index.js +429 -0
- package/lib/upload/FilesWall/index.less +74 -0
- package/lib/upload/Form/index.js +2 -1
- package/lib/upload/FormItem/index.js +3 -5
- package/lib/upload/index.js +8 -1
- package/lib/utils/action.js +2 -2
- package/package.json +5 -4
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["className"];
|
|
3
4
|
import React from 'react';
|
|
5
|
+
import { useMemoizedFn } from 'ahooks';
|
|
4
6
|
import Index from "./index";
|
|
5
7
|
var FunctionDesign = function FunctionDesign(_ref) {
|
|
6
|
-
var
|
|
8
|
+
var className = _ref.className,
|
|
7
9
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
8
|
-
|
|
10
|
+
var handleClick = useMemoizedFn(function () {});
|
|
11
|
+
return /*#__PURE__*/React.createElement(Index, _extends({
|
|
12
|
+
onClick: handleClick
|
|
13
|
+
}, props));
|
|
9
14
|
};
|
|
10
15
|
export default FunctionDesign;
|
|
@@ -1,21 +1,271 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
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";
|
|
6
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
1
7
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
var _excluded = ["id"];
|
|
3
|
-
import React, { useRef } from 'react';
|
|
4
|
-
import
|
|
8
|
+
var _excluded = ["id", "title", "type", "size", "iconFont", "block", "ghost", "css", "className", "onClick", "advance", "impexpSetting"];
|
|
9
|
+
import React, { useRef, useState, useEffect } from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
import { useMemoizedFn, useMount, useUnmount, useRequest } from 'ahooks';
|
|
12
|
+
import { notification, Icon as IconAntd, Upload, Button as ButtonAntd, Progress } from 'luck-design/antd';
|
|
13
|
+
import styled from 'styled-components';
|
|
14
|
+
import classNames from 'classnames';
|
|
15
|
+
import styles from "./index.less";
|
|
16
|
+
import { useRemoteSource } from "../../../engine/provider/ContextProvider";
|
|
5
17
|
import Wrapper from "../Wrapper";
|
|
6
|
-
|
|
18
|
+
import { LdButton as Button } from "../../../../components/LdCom";
|
|
19
|
+
import Icon from "../../../../components/IconFont";
|
|
20
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
21
|
+
import { omitBadProps } from "../../../engine/tools/helper";
|
|
22
|
+
import { exportExcel, readExportExcelState } from "../../../constants/api-url";
|
|
23
|
+
import defaultMeta from "../../../engine/meta/imex.props.default.json";
|
|
24
|
+
import { isUrl } from '@luck-design-biz/base/utils';
|
|
25
|
+
var StyledButton = styled(Button).withConfig({
|
|
26
|
+
displayName: "StyledButton",
|
|
27
|
+
componentId: "luckda-6530__sc-mil6cj-0"
|
|
28
|
+
})(["", ""], function (props) {
|
|
29
|
+
return props.$css;
|
|
30
|
+
});
|
|
31
|
+
var LCButton = function LCButton(_ref) {
|
|
7
32
|
var id = _ref.id,
|
|
8
|
-
|
|
33
|
+
title = _ref.title,
|
|
34
|
+
type = _ref.type,
|
|
35
|
+
size = _ref.size,
|
|
36
|
+
iconFont = _ref.iconFont,
|
|
37
|
+
block = _ref.block,
|
|
38
|
+
ghost = _ref.ghost,
|
|
39
|
+
css = _ref.css,
|
|
40
|
+
className = _ref.className,
|
|
41
|
+
onClick = _ref.onClick,
|
|
42
|
+
advance = _ref.advance,
|
|
43
|
+
impexpSetting = _ref.impexpSetting,
|
|
44
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
9
45
|
var ref = useRef();
|
|
46
|
+
var uploadRef = useRef();
|
|
47
|
+
var _useRemoteSource = useRemoteSource(),
|
|
48
|
+
module = _useRemoteSource.module,
|
|
49
|
+
moduleCode = _useRemoteSource.moduleCode;
|
|
50
|
+
var _useState = useState(false),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
uploadLoading = _useState2[0],
|
|
53
|
+
setUploadLoading = _useState2[1];
|
|
54
|
+
var _useRequest = useRequest(exportExcel, {
|
|
55
|
+
manual: true
|
|
56
|
+
}),
|
|
57
|
+
_loading = _useRequest.loading,
|
|
58
|
+
runAsync = _useRequest.runAsync,
|
|
59
|
+
data = _useRequest.data;
|
|
60
|
+
var fecthExcelState = function fecthExcelState(payload, procress, resolve, reject) {
|
|
61
|
+
// 查询进度
|
|
62
|
+
readExportExcelState(payload).then(function (ret) {
|
|
63
|
+
var cpage = ret.cpage,
|
|
64
|
+
total = ret.total,
|
|
65
|
+
downloadUrl = ret.downloadUrl;
|
|
66
|
+
if (cpage >= total) {
|
|
67
|
+
resolve("".concat(window.location.origin, "/api").concat(downloadUrl));
|
|
68
|
+
} else {
|
|
69
|
+
procress(cpage / total * 100);
|
|
70
|
+
fecthExcelState(payload, procress, resolve, reject);
|
|
71
|
+
}
|
|
72
|
+
}).catch(function () {
|
|
73
|
+
reject();
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
var handleExportAll = function handleExportAll(procress) {
|
|
77
|
+
return new Promise( /*#__PURE__*/function () {
|
|
78
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
|
|
79
|
+
var joiner, payload;
|
|
80
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
81
|
+
while (1) switch (_context.prev = _context.next) {
|
|
82
|
+
case 0:
|
|
83
|
+
joiner = 'apiUrl'.indexOf('?') !== -1 ? '&' : '?';
|
|
84
|
+
_context.next = 3;
|
|
85
|
+
return runAsync({
|
|
86
|
+
apiUrl: "apiurl".concat(joiner, "token=").concat(window.cookie.get(window.appConfig.authSaveKey)),
|
|
87
|
+
code: impexpSetting.customParam
|
|
88
|
+
});
|
|
89
|
+
case 3:
|
|
90
|
+
payload = _context.sent;
|
|
91
|
+
if (payload && typeof payload === 'string') {
|
|
92
|
+
fecthExcelState(payload, procress, resolve, reject);
|
|
93
|
+
} else {
|
|
94
|
+
reject();
|
|
95
|
+
}
|
|
96
|
+
case 5:
|
|
97
|
+
case "end":
|
|
98
|
+
return _context.stop();
|
|
99
|
+
}
|
|
100
|
+
}, _callee);
|
|
101
|
+
}));
|
|
102
|
+
return function (_x, _x2) {
|
|
103
|
+
return _ref2.apply(this, arguments);
|
|
104
|
+
};
|
|
105
|
+
}());
|
|
106
|
+
};
|
|
107
|
+
var doExportAll = function doExportAll(onExportAll) {
|
|
108
|
+
var key = 'exportAll';
|
|
109
|
+
var notificationConfig = {
|
|
110
|
+
key: key,
|
|
111
|
+
duration: null,
|
|
112
|
+
message: '正在导出数据...',
|
|
113
|
+
placement: 'bottomRight',
|
|
114
|
+
closeIcon: /*#__PURE__*/React.createElement("div", null),
|
|
115
|
+
icon: /*#__PURE__*/React.createElement(IconAntd, {
|
|
116
|
+
type: "cloud-download",
|
|
117
|
+
className: styles.exportTheme
|
|
118
|
+
})
|
|
119
|
+
};
|
|
120
|
+
var process = function process(i) {
|
|
121
|
+
notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
|
|
122
|
+
description: /*#__PURE__*/React.createElement(Progress, {
|
|
123
|
+
percent: i
|
|
124
|
+
})
|
|
125
|
+
}));
|
|
126
|
+
};
|
|
127
|
+
notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
|
|
128
|
+
description: /*#__PURE__*/React.createElement(Progress, {
|
|
129
|
+
percent: 0
|
|
130
|
+
})
|
|
131
|
+
}));
|
|
132
|
+
onExportAll(process).then(function (ret) {
|
|
133
|
+
if (ret) {
|
|
134
|
+
window.location.href = ret;
|
|
135
|
+
}
|
|
136
|
+
notification.close(key);
|
|
137
|
+
}).catch(function () {
|
|
138
|
+
return notification.open(_objectSpread(_objectSpread({}, notificationConfig), {}, {
|
|
139
|
+
icon: /*#__PURE__*/React.createElement(IconAntd, {
|
|
140
|
+
type: "cloud-download",
|
|
141
|
+
className: styles.exportErrorTheme
|
|
142
|
+
}),
|
|
143
|
+
message: '导出失败',
|
|
144
|
+
duration: 4
|
|
145
|
+
}));
|
|
146
|
+
});
|
|
147
|
+
};
|
|
10
148
|
var getTargetDom = useMemoizedFn(function () {
|
|
11
|
-
|
|
149
|
+
var _ref$current;
|
|
150
|
+
return (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.buttonNode;
|
|
12
151
|
});
|
|
152
|
+
var getActionUrl = function getActionUrl() {
|
|
153
|
+
var caturl = impexpSetting.customType ? "selectKey=".concat(impexpSetting.customParam) : "inputKey=".concat(impexpSetting.customParam);
|
|
154
|
+
return caturl;
|
|
155
|
+
};
|
|
156
|
+
var formItemProps = {
|
|
157
|
+
action: getActionUrl(),
|
|
158
|
+
// 上传地址
|
|
159
|
+
headers: {
|
|
160
|
+
Authorization: "Bearer ".concat(window.cookie.get(window.appConfig.authSaveKey))
|
|
161
|
+
},
|
|
162
|
+
name: 'files',
|
|
163
|
+
showUploadList: false,
|
|
164
|
+
beforeUpload: function beforeUpload(file, fileList) {
|
|
165
|
+
setUploadLoading(true);
|
|
166
|
+
return file;
|
|
167
|
+
},
|
|
168
|
+
onChange: function onChange(e) {
|
|
169
|
+
setUploadLoading(false);
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
var handleClick = useMemoizedFn( /*#__PURE__*/function () {
|
|
173
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
|
|
174
|
+
var _uploadRef$current;
|
|
175
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
176
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
177
|
+
case 0:
|
|
178
|
+
if (!onClick) {
|
|
179
|
+
_context2.next = 3;
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
onClick(e);
|
|
183
|
+
return _context2.abrupt("return");
|
|
184
|
+
case 3:
|
|
185
|
+
if (impexpSetting.type === 'export') {
|
|
186
|
+
doExportAll(handleExportAll);
|
|
187
|
+
} else {
|
|
188
|
+
if (uploadRef.current) {
|
|
189
|
+
(_uploadRef$current = uploadRef.current) === null || _uploadRef$current === void 0 || (_uploadRef$current = _uploadRef$current.upload) === null || _uploadRef$current === void 0 || (_uploadRef$current = _uploadRef$current.uploader) === null || _uploadRef$current === void 0 || _uploadRef$current.onClick();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
case 4:
|
|
193
|
+
case "end":
|
|
194
|
+
return _context2.stop();
|
|
195
|
+
}
|
|
196
|
+
}, _callee2);
|
|
197
|
+
}));
|
|
198
|
+
return function (_x3) {
|
|
199
|
+
return _ref3.apply(this, arguments);
|
|
200
|
+
};
|
|
201
|
+
}());
|
|
202
|
+
// console.log(formItemProps, module, moduleCode)
|
|
203
|
+
|
|
13
204
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
14
205
|
id: id,
|
|
15
|
-
displayName: "
|
|
206
|
+
displayName: "Imex",
|
|
16
207
|
getTargetDom: getTargetDom
|
|
208
|
+
}, /*#__PURE__*/React.createElement(StyledButton, {
|
|
209
|
+
ref: ref,
|
|
210
|
+
type: type,
|
|
211
|
+
size: size,
|
|
212
|
+
block: block,
|
|
213
|
+
ghost: ghost,
|
|
214
|
+
$css: css,
|
|
215
|
+
className: classNames(_defineProperty({}, className, !!className)),
|
|
216
|
+
onClick: handleClick,
|
|
217
|
+
loading: !!_loading || !!uploadLoading
|
|
17
218
|
}, /*#__PURE__*/React.createElement("div", {
|
|
18
|
-
|
|
19
|
-
|
|
219
|
+
style: {
|
|
220
|
+
display: 'none'
|
|
221
|
+
}
|
|
222
|
+
}, /*#__PURE__*/React.createElement(Upload, _extends({}, formItemProps, {
|
|
223
|
+
ref: uploadRef
|
|
224
|
+
}))), iconFont ? /*#__PURE__*/React.createElement(Icon, {
|
|
225
|
+
type: iconFont
|
|
226
|
+
}) : null, title || formatMessage({
|
|
227
|
+
id: 'luckda.lowcode.painter.import',
|
|
228
|
+
label: '导入'
|
|
229
|
+
})));
|
|
20
230
|
};
|
|
21
|
-
|
|
231
|
+
LCButton.propTypes = {
|
|
232
|
+
/**
|
|
233
|
+
* @name 唯一标识
|
|
234
|
+
* @type string
|
|
235
|
+
* @disabled true
|
|
236
|
+
*/
|
|
237
|
+
id: PropTypes.string.isRequired,
|
|
238
|
+
/**
|
|
239
|
+
* @name 按钮标题
|
|
240
|
+
* @type string
|
|
241
|
+
* @default 12:3:9
|
|
242
|
+
*/
|
|
243
|
+
title: PropTypes.string,
|
|
244
|
+
/**
|
|
245
|
+
* @name 按钮类型
|
|
246
|
+
* @type _ButtonType
|
|
247
|
+
* @default 'default'
|
|
248
|
+
*/
|
|
249
|
+
type: PropTypes.oneOf(['default', 'primary', 'dashed', 'danger']),
|
|
250
|
+
/**
|
|
251
|
+
* @name impexpSetting
|
|
252
|
+
* @type _ImpExpAlone
|
|
253
|
+
* @default { "customType": false, "customParam": false, "type": "export" }
|
|
254
|
+
*/
|
|
255
|
+
impexpSetting: PropTypes.object,
|
|
256
|
+
/**
|
|
257
|
+
* @name 按钮大小
|
|
258
|
+
* @type segmented
|
|
259
|
+
* @options [{ "label": "小", "value": "small"}, { "label": "中", "value": "middle" }, { "label": "大", "value": "large" }]
|
|
260
|
+
* @default 'default'
|
|
261
|
+
*/
|
|
262
|
+
size: PropTypes.oneOf(['small', 'default', 'large']),
|
|
263
|
+
/**
|
|
264
|
+
* @name 将按钮宽度调整为其父宽度的选项
|
|
265
|
+
* @type boolean
|
|
266
|
+
* @default false
|
|
267
|
+
*/
|
|
268
|
+
block: PropTypes.bool
|
|
269
|
+
};
|
|
270
|
+
LCButton.defaultProps = omitBadProps(defaultMeta);
|
|
271
|
+
export default LCButton;
|
|
@@ -14,40 +14,72 @@
|
|
|
14
14
|
"disabled": true
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
"key": "
|
|
18
|
-
"name": "
|
|
19
|
-
"desc": "
|
|
20
|
-
"type": "
|
|
17
|
+
"key": "title",
|
|
18
|
+
"name": "标题",
|
|
19
|
+
"desc": "按钮上显示的文字",
|
|
20
|
+
"type": "_I18nInput",
|
|
21
|
+
"default": "导入|导出"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"key": "impexpSetting",
|
|
25
|
+
"type": "_ImpExpAlone",
|
|
26
|
+
"default": {
|
|
27
|
+
"customType": false,
|
|
28
|
+
"customParam": false,
|
|
29
|
+
"type": "export"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"key": "size",
|
|
34
|
+
"name": "按钮",
|
|
35
|
+
"type": "segmented",
|
|
36
|
+
"repositioning": true,
|
|
21
37
|
"options": [
|
|
22
38
|
{
|
|
23
|
-
"label": "
|
|
24
|
-
"value": "
|
|
39
|
+
"label": "小",
|
|
40
|
+
"value": "small"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"label": "中",
|
|
44
|
+
"value": "middle"
|
|
25
45
|
},
|
|
26
46
|
{
|
|
27
|
-
"label": "
|
|
28
|
-
"value": "
|
|
47
|
+
"label": "大",
|
|
48
|
+
"value": "large"
|
|
29
49
|
}
|
|
30
50
|
],
|
|
31
|
-
"default": "
|
|
51
|
+
"default": "middle"
|
|
32
52
|
},
|
|
33
53
|
{
|
|
34
|
-
"key": "
|
|
35
|
-
"name": "
|
|
36
|
-
"desc": "
|
|
37
|
-
"type": "
|
|
38
|
-
"
|
|
54
|
+
"key": "block",
|
|
55
|
+
"name": "块级",
|
|
56
|
+
"desc": "将按钮宽度调整为其父宽度的选项",
|
|
57
|
+
"type": "switch",
|
|
58
|
+
"repositioning": true,
|
|
59
|
+
"default": false
|
|
39
60
|
},
|
|
40
61
|
{
|
|
41
|
-
"key": "
|
|
42
|
-
"name": "
|
|
43
|
-
"
|
|
44
|
-
"
|
|
62
|
+
"key": "type",
|
|
63
|
+
"name": "按钮类型",
|
|
64
|
+
"type": "_ButtonType",
|
|
65
|
+
"default": "primary"
|
|
45
66
|
},
|
|
46
67
|
{
|
|
47
|
-
"key": "
|
|
48
|
-
"name": "
|
|
49
|
-
"
|
|
50
|
-
"
|
|
68
|
+
"key": "iconFont",
|
|
69
|
+
"name": "图标",
|
|
70
|
+
"type": "_Icon",
|
|
71
|
+
"next": {
|
|
72
|
+
"name": "选择图标",
|
|
73
|
+
"autoClose": true,
|
|
74
|
+
"props": [
|
|
75
|
+
{
|
|
76
|
+
"key": "iconFont",
|
|
77
|
+
"name": "#图标选择器",
|
|
78
|
+
"type": "_IconSelector"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"repositioning": true
|
|
51
83
|
}
|
|
52
84
|
],
|
|
53
85
|
"css": {},
|
|
@@ -79,4 +111,4 @@
|
|
|
79
111
|
}
|
|
80
112
|
]
|
|
81
113
|
}
|
|
82
|
-
}
|
|
114
|
+
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
4
|
var _excluded = ["children", "id", "columnRatio"];
|
|
6
5
|
import React, { useEffect } from 'react';
|
|
7
6
|
import { useCreation, useMemoizedFn } from 'ahooks';
|
|
8
7
|
import { drop } from 'lodash';
|
|
9
8
|
import { suid } from '@luck-design-biz/base/utils';
|
|
10
|
-
import { useContext,
|
|
9
|
+
import { useContext, useGet, addNode, deleteNode, modifyNode } from "../../../engine/provider/ContextProvider";
|
|
11
10
|
import Index from "./index";
|
|
12
|
-
import { add, modifyById, deleteById, findNodeAndParent } from "../../../engine/tools/dataProcess";
|
|
13
11
|
import boxDefaultMeta from "../../../engine/meta/box.props.default.json";
|
|
14
12
|
var LayoutFunctionDesign = function LayoutFunctionDesign(_ref) {
|
|
15
13
|
var children = _ref.children,
|
|
@@ -17,29 +15,27 @@ var LayoutFunctionDesign = function LayoutFunctionDesign(_ref) {
|
|
|
17
15
|
columnRatio = _ref.columnRatio,
|
|
18
16
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
17
|
var ctx = useContext();
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var refreshChild = useMemoizedFn(function (
|
|
24
|
-
var _findNodeAndParent = findNodeAndParent(id, _pageData),
|
|
25
|
-
current = _findNodeAndParent.node;
|
|
18
|
+
var current = useGet({
|
|
19
|
+
id: id
|
|
20
|
+
});
|
|
21
|
+
var refreshChild = useMemoizedFn(function () {
|
|
26
22
|
var ratioArr = columnRatio.split(':');
|
|
27
23
|
drop(current.children, ratioArr.length).forEach(function (boxId) {
|
|
28
|
-
|
|
24
|
+
deleteNode(boxId);
|
|
29
25
|
});
|
|
30
26
|
ratioArr.forEach(function (item, index) {
|
|
31
27
|
var _current$children;
|
|
32
28
|
var ratio = parseInt(item, 10);
|
|
33
29
|
var boxId = (_current$children = current.children) === null || _current$children === void 0 ? void 0 : _current$children[index];
|
|
34
30
|
if (boxId) {
|
|
35
|
-
|
|
31
|
+
modifyNode(current.children[index], _objectSpread(_objectSpread({}, current[boxId].props), {}, {
|
|
36
32
|
style: {
|
|
37
33
|
gridColumn: 'span ' + ratio
|
|
38
34
|
}
|
|
39
35
|
}));
|
|
40
36
|
} else {
|
|
41
37
|
boxId = "box_".concat(suid());
|
|
42
|
-
|
|
38
|
+
addNode(id, boxId, _objectSpread(_objectSpread({}, boxDefaultMeta), {}, {
|
|
43
39
|
buildIn: true,
|
|
44
40
|
style: {
|
|
45
41
|
gridColumn: 'span ' + ratio
|
|
@@ -47,23 +43,20 @@ var LayoutFunctionDesign = function LayoutFunctionDesign(_ref) {
|
|
|
47
43
|
}));
|
|
48
44
|
}
|
|
49
45
|
});
|
|
50
|
-
setPageData(_pageData);
|
|
51
46
|
});
|
|
52
47
|
useCreation(function () {
|
|
53
48
|
if (children !== null && children !== void 0 && children.length) return;
|
|
54
49
|
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
55
|
-
var compId = _ref2.id
|
|
56
|
-
pageData = _ref2.pageData;
|
|
50
|
+
var compId = _ref2.id;
|
|
57
51
|
if (compId !== id) return;
|
|
58
|
-
refreshChild(
|
|
52
|
+
refreshChild();
|
|
59
53
|
}).watch();
|
|
60
54
|
}, []);
|
|
61
55
|
useEffect(function () {
|
|
62
56
|
var cmid = ctx.$subscriber(ctx.topics.COMPONENT_MODIFY).on(function (_ref3) {
|
|
63
|
-
var compId = _ref3.id
|
|
64
|
-
pageData = _ref3.pageData;
|
|
57
|
+
var compId = _ref3.id;
|
|
65
58
|
if (compId !== id) return;
|
|
66
|
-
refreshChild(
|
|
59
|
+
refreshChild();
|
|
67
60
|
}).watch();
|
|
68
61
|
return function () {
|
|
69
62
|
return ctx.$unsubscriber(ctx.topics.COMPONENT_MODIFY, cmid);
|
|
@@ -94,13 +94,13 @@
|
|
|
94
94
|
"key": "onMount",
|
|
95
95
|
"name": "组件首次渲染时",
|
|
96
96
|
"desc": "在组件首次渲染时,执行方法",
|
|
97
|
-
"func": "(params)
|
|
97
|
+
"func": "function onMount(params) {\n\t\n}"
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"key": "onUnmount",
|
|
101
101
|
"name": "组件卸载时",
|
|
102
102
|
"desc": "在组件卸载时,执行方法。",
|
|
103
|
-
"func": "(params)
|
|
103
|
+
"func": "function onUnmount(params) {\n\t\n}"
|
|
104
104
|
}
|
|
105
105
|
]
|
|
106
106
|
}
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"key": "onPageMount",
|
|
37
37
|
"name": "组件首次渲染时",
|
|
38
38
|
"desc": "在组件首次渲染时,执行方法",
|
|
39
|
-
"func": "(
|
|
39
|
+
"func": "function onPageMount()=>{\n\t\n}"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"key": "onPageUnmount",
|
|
43
43
|
"name": "组件卸载时",
|
|
44
44
|
"desc": "在组件卸载时,执行方法。",
|
|
45
|
-
"func": "(
|
|
45
|
+
"func": "function onPageUnmount()=>{\n\t\n}"
|
|
46
46
|
}
|
|
47
47
|
]
|
|
48
48
|
}
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
2
2
|
import React, { useRef } from 'react';
|
|
3
3
|
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import {
|
|
5
|
+
import { useGet } from "../../../engine/provider/ContextProvider";
|
|
6
6
|
import useCanvasRender from "../../../engine/tools/useCanvasRender";
|
|
7
7
|
import Wrapper from "../Wrapper";
|
|
8
8
|
import { LC_BUILDIN_UNIT_KEY } from "../../../constants";
|
|
@@ -15,12 +15,11 @@ var Div = styled.div.withConfig({
|
|
|
15
15
|
});
|
|
16
16
|
var PageContent = function PageContent() {
|
|
17
17
|
var ref = useRef();
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
headercss = _usePageData2$[2];
|
|
18
|
+
var _useGet = useGet([LC_BUILDIN_UNIT_KEY.PAGE_CONTENT, 'props.enableHeader', "".concat(LC_BUILDIN_UNIT_KEY.PAGE_HEADER, ".props.css")]),
|
|
19
|
+
_useGet2 = _slicedToArray(_useGet, 3),
|
|
20
|
+
pagecontent = _useGet2[0],
|
|
21
|
+
enableHeader = _useGet2[1],
|
|
22
|
+
headercss = _useGet2[2];
|
|
24
23
|
var canvas = useCanvasRender(pagecontent);
|
|
25
24
|
var contentStyle = useCreation(function () {
|
|
26
25
|
if (enableHeader) {
|
|
@@ -40,7 +39,7 @@ var PageContent = function PageContent() {
|
|
|
40
39
|
var getTargetDom = useMemoizedFn(function () {
|
|
41
40
|
return ref.current;
|
|
42
41
|
});
|
|
43
|
-
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
42
|
+
return pagecontent ? /*#__PURE__*/React.createElement(Wrapper, {
|
|
44
43
|
id: LC_BUILDIN_UNIT_KEY.PAGE_CONTENT,
|
|
45
44
|
displayName: "PageContent",
|
|
46
45
|
getTargetDom: getTargetDom
|
|
@@ -48,6 +47,6 @@ var PageContent = function PageContent() {
|
|
|
48
47
|
ref: ref,
|
|
49
48
|
$css: pagecontent.props.css,
|
|
50
49
|
style: contentStyle
|
|
51
|
-
}, canvas));
|
|
50
|
+
}, canvas)) : null;
|
|
52
51
|
};
|
|
53
52
|
export default PageContent;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
1
|
import React, { useRef } from 'react';
|
|
3
2
|
import { useMemoizedFn } from 'ahooks';
|
|
4
3
|
import styled from 'styled-components';
|
|
5
|
-
import {
|
|
4
|
+
import { useGet } from "../../../engine/provider/ContextProvider";
|
|
6
5
|
import useCanvasRender from "../../../engine/tools/useCanvasRender";
|
|
7
6
|
import Wrapper from "../Wrapper";
|
|
8
7
|
import { LC_BUILDIN_UNIT_KEY } from "../../../constants";
|
|
@@ -14,9 +13,7 @@ var Div = styled.div.withConfig({
|
|
|
14
13
|
});
|
|
15
14
|
var PageFooter = function PageFooter() {
|
|
16
15
|
var ref = useRef();
|
|
17
|
-
var
|
|
18
|
-
_usePageData2 = _slicedToArray(_usePageData, 1),
|
|
19
|
-
pagefoot = _usePageData2[0];
|
|
16
|
+
var pagefoot = useGet(LC_BUILDIN_UNIT_KEY.PAGE_FOOTER);
|
|
20
17
|
var canvas = useCanvasRender(pagefoot);
|
|
21
18
|
var getTargetDom = useMemoizedFn(function () {
|
|
22
19
|
return ref.current;
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
2
2
|
import React, { useRef } from 'react';
|
|
3
3
|
import { useMemoizedFn } from 'ahooks';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
|
-
import {
|
|
5
|
+
import { useGet } from "../../../engine/provider/ContextProvider";
|
|
6
6
|
import useCanvasRender from "../../../engine/tools/useCanvasRender";
|
|
7
7
|
import Wrapper from "../Wrapper";
|
|
8
8
|
import { LC_BUILDIN_UNIT_KEY } from "../../../constants";
|
|
@@ -14,11 +14,10 @@ var Div = styled.div.withConfig({
|
|
|
14
14
|
});
|
|
15
15
|
var PageHeader = function PageHeader() {
|
|
16
16
|
var ref = useRef();
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
fixed = _usePageData2$[1];
|
|
17
|
+
var _useGet = useGet([LC_BUILDIN_UNIT_KEY.PAGE_HEADER, 'props.fixedHeader']),
|
|
18
|
+
_useGet2 = _slicedToArray(_useGet, 2),
|
|
19
|
+
pageheader = _useGet2[0],
|
|
20
|
+
fixed = _useGet2[1];
|
|
22
21
|
var canvas = useCanvasRender(pageheader);
|
|
23
22
|
var getTargetDom = useMemoizedFn(function () {
|
|
24
23
|
return ref.current;
|