@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
|
@@ -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
|
+
}
|
|
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
13
|
var _ahooks = require("ahooks");
|
|
@@ -16,7 +15,6 @@ var _lodash = require("lodash");
|
|
|
16
15
|
var _utils = require("@luck-design-biz/base/utils");
|
|
17
16
|
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
18
17
|
var _index = _interopRequireDefault(require("./index"));
|
|
19
|
-
var _dataProcess = require("../../../engine/tools/dataProcess");
|
|
20
18
|
var _boxPropsDefault = _interopRequireDefault(require("../../../engine/meta/box.props.default.json"));
|
|
21
19
|
var _excluded = ["children", "id", "columnRatio"];
|
|
22
20
|
var LayoutFunctionDesign = function LayoutFunctionDesign(_ref) {
|
|
@@ -25,29 +23,27 @@ var LayoutFunctionDesign = function LayoutFunctionDesign(_ref) {
|
|
|
25
23
|
columnRatio = _ref.columnRatio,
|
|
26
24
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
27
25
|
var ctx = (0, _ContextProvider.useContext)();
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var refreshChild = (0, _ahooks.useMemoizedFn)(function (
|
|
32
|
-
var _findNodeAndParent = (0, _dataProcess.findNodeAndParent)(id, _pageData),
|
|
33
|
-
current = _findNodeAndParent.node;
|
|
26
|
+
var current = (0, _ContextProvider.useGet)({
|
|
27
|
+
id: id
|
|
28
|
+
});
|
|
29
|
+
var refreshChild = (0, _ahooks.useMemoizedFn)(function () {
|
|
34
30
|
var ratioArr = columnRatio.split(':');
|
|
35
31
|
(0, _lodash.drop)(current.children, ratioArr.length).forEach(function (boxId) {
|
|
36
|
-
(0,
|
|
32
|
+
(0, _ContextProvider.deleteNode)(boxId);
|
|
37
33
|
});
|
|
38
34
|
ratioArr.forEach(function (item, index) {
|
|
39
35
|
var _current$children;
|
|
40
36
|
var ratio = parseInt(item, 10);
|
|
41
37
|
var boxId = (_current$children = current.children) === null || _current$children === void 0 ? void 0 : _current$children[index];
|
|
42
38
|
if (boxId) {
|
|
43
|
-
(0,
|
|
39
|
+
(0, _ContextProvider.modifyNode)(current.children[index], (0, _objectSpread2.default)((0, _objectSpread2.default)({}, current[boxId].props), {}, {
|
|
44
40
|
style: {
|
|
45
41
|
gridColumn: 'span ' + ratio
|
|
46
42
|
}
|
|
47
43
|
}));
|
|
48
44
|
} else {
|
|
49
45
|
boxId = "box_".concat((0, _utils.suid)());
|
|
50
|
-
(0,
|
|
46
|
+
(0, _ContextProvider.addNode)(id, boxId, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _boxPropsDefault.default), {}, {
|
|
51
47
|
buildIn: true,
|
|
52
48
|
style: {
|
|
53
49
|
gridColumn: 'span ' + ratio
|
|
@@ -55,23 +51,20 @@ var LayoutFunctionDesign = function LayoutFunctionDesign(_ref) {
|
|
|
55
51
|
}));
|
|
56
52
|
}
|
|
57
53
|
});
|
|
58
|
-
setPageData(_pageData);
|
|
59
54
|
});
|
|
60
55
|
(0, _ahooks.useCreation)(function () {
|
|
61
56
|
if (children !== null && children !== void 0 && children.length) return;
|
|
62
57
|
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
63
|
-
var compId = _ref2.id
|
|
64
|
-
pageData = _ref2.pageData;
|
|
58
|
+
var compId = _ref2.id;
|
|
65
59
|
if (compId !== id) return;
|
|
66
|
-
refreshChild(
|
|
60
|
+
refreshChild();
|
|
67
61
|
}).watch();
|
|
68
62
|
}, []);
|
|
69
63
|
(0, _react.useEffect)(function () {
|
|
70
64
|
var cmid = ctx.$subscriber(ctx.topics.COMPONENT_MODIFY).on(function (_ref3) {
|
|
71
|
-
var compId = _ref3.id
|
|
72
|
-
pageData = _ref3.pageData;
|
|
65
|
+
var compId = _ref3.id;
|
|
73
66
|
if (compId !== id) return;
|
|
74
|
-
refreshChild(
|
|
67
|
+
refreshChild();
|
|
75
68
|
}).watch();
|
|
76
69
|
return function () {
|
|
77
70
|
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
|
}
|
|
@@ -23,12 +23,11 @@ var Div = _styledComponents.default.div.withConfig({
|
|
|
23
23
|
});
|
|
24
24
|
var PageContent = function PageContent() {
|
|
25
25
|
var ref = (0, _react.useRef)();
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
headercss = _usePageData2$[2];
|
|
26
|
+
var _useGet = (0, _ContextProvider.useGet)([_constants.LC_BUILDIN_UNIT_KEY.PAGE_CONTENT, 'props.enableHeader', "".concat(_constants.LC_BUILDIN_UNIT_KEY.PAGE_HEADER, ".props.css")]),
|
|
27
|
+
_useGet2 = (0, _slicedToArray2.default)(_useGet, 3),
|
|
28
|
+
pagecontent = _useGet2[0],
|
|
29
|
+
enableHeader = _useGet2[1],
|
|
30
|
+
headercss = _useGet2[2];
|
|
32
31
|
var canvas = (0, _useCanvasRender.default)(pagecontent);
|
|
33
32
|
var contentStyle = (0, _ahooks.useCreation)(function () {
|
|
34
33
|
if (enableHeader) {
|
|
@@ -48,7 +47,7 @@ var PageContent = function PageContent() {
|
|
|
48
47
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
49
48
|
return ref.current;
|
|
50
49
|
});
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
50
|
+
return pagecontent ? /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
52
51
|
id: _constants.LC_BUILDIN_UNIT_KEY.PAGE_CONTENT,
|
|
53
52
|
displayName: "PageContent",
|
|
54
53
|
getTargetDom: getTargetDom
|
|
@@ -56,6 +55,6 @@ var PageContent = function PageContent() {
|
|
|
56
55
|
ref: ref,
|
|
57
56
|
$css: pagecontent.props.css,
|
|
58
57
|
style: contentStyle
|
|
59
|
-
}, canvas));
|
|
58
|
+
}, canvas)) : null;
|
|
60
59
|
};
|
|
61
60
|
var _default = exports.default = PageContent;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _ahooks = require("ahooks");
|
|
12
11
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
@@ -22,9 +21,7 @@ var Div = _styledComponents.default.div.withConfig({
|
|
|
22
21
|
});
|
|
23
22
|
var PageFooter = function PageFooter() {
|
|
24
23
|
var ref = (0, _react.useRef)();
|
|
25
|
-
var
|
|
26
|
-
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 1),
|
|
27
|
-
pagefoot = _usePageData2[0];
|
|
24
|
+
var pagefoot = (0, _ContextProvider.useGet)(_constants.LC_BUILDIN_UNIT_KEY.PAGE_FOOTER);
|
|
28
25
|
var canvas = (0, _useCanvasRender.default)(pagefoot);
|
|
29
26
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
30
27
|
return ref.current;
|
|
@@ -22,11 +22,10 @@ var Div = _styledComponents.default.div.withConfig({
|
|
|
22
22
|
});
|
|
23
23
|
var PageHeader = function PageHeader() {
|
|
24
24
|
var ref = (0, _react.useRef)();
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
fixed = _usePageData2$[1];
|
|
25
|
+
var _useGet = (0, _ContextProvider.useGet)([_constants.LC_BUILDIN_UNIT_KEY.PAGE_HEADER, 'props.fixedHeader']),
|
|
26
|
+
_useGet2 = (0, _slicedToArray2.default)(_useGet, 2),
|
|
27
|
+
pageheader = _useGet2[0],
|
|
28
|
+
fixed = _useGet2[1];
|
|
30
29
|
var canvas = (0, _useCanvasRender.default)(pageheader);
|
|
31
30
|
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
32
31
|
return ref.current;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _ahooks = require("ahooks");
|
|
14
|
+
var _utils = require("@luck-design-biz/base/utils");
|
|
15
|
+
var _lodash = require("lodash");
|
|
16
|
+
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
17
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
18
|
+
var _boxPropsDefault = _interopRequireDefault(require("../../../engine/meta/box.props.default.json"));
|
|
19
|
+
var _excluded = ["children", "id", "display"];
|
|
20
|
+
var FunctionDesign = function FunctionDesign(_ref) {
|
|
21
|
+
var children = _ref.children,
|
|
22
|
+
id = _ref.id,
|
|
23
|
+
display = _ref.display,
|
|
24
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
25
|
+
var ctx = (0, _ContextProvider.useContext)();
|
|
26
|
+
var current = (0, _ContextProvider.useGet)({
|
|
27
|
+
id: id
|
|
28
|
+
});
|
|
29
|
+
var refreshChild = (0, _ahooks.useMemoizedFn)(function () {
|
|
30
|
+
var _current$children;
|
|
31
|
+
var ratioArr = display.split('');
|
|
32
|
+
if (ratioArr.length === ((_current$children = current.children) === null || _current$children === void 0 ? void 0 : _current$children.length)) return;
|
|
33
|
+
(0, _lodash.drop)(current.children, ratioArr.length).forEach(function (boxId) {
|
|
34
|
+
(0, _ContextProvider.deleteNode)(boxId);
|
|
35
|
+
});
|
|
36
|
+
ratioArr.forEach(function (_, index) {
|
|
37
|
+
var _current$children2;
|
|
38
|
+
if (!((_current$children2 = current.children) !== null && _current$children2 !== void 0 && _current$children2[index])) {
|
|
39
|
+
(0, _ContextProvider.addNode)(id, "box_".concat((0, _utils.suid)()), (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _boxPropsDefault.default), {}, {
|
|
40
|
+
buildIn: true
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
(0, _ahooks.useCreation)(function () {
|
|
46
|
+
if (children !== null && children !== void 0 && children.length) return;
|
|
47
|
+
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
48
|
+
var compId = _ref2.id;
|
|
49
|
+
if (compId !== id) return;
|
|
50
|
+
refreshChild();
|
|
51
|
+
}).watch();
|
|
52
|
+
}, []);
|
|
53
|
+
(0, _react.useEffect)(function () {
|
|
54
|
+
var cmid = ctx.$subscriber(ctx.topics.COMPONENT_MODIFY).on(function (_ref3) {
|
|
55
|
+
var compId = _ref3.id,
|
|
56
|
+
newValue = _ref3.newValue;
|
|
57
|
+
if (compId !== id) return;
|
|
58
|
+
if (newValue.hasOwnProperty('display')) {
|
|
59
|
+
refreshChild();
|
|
60
|
+
}
|
|
61
|
+
}).watch();
|
|
62
|
+
return function () {
|
|
63
|
+
return ctx.$unsubscriber(ctx.topics.COMPONENT_MODIFY, cmid);
|
|
64
|
+
};
|
|
65
|
+
}, []);
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, (0, _extends2.default)({
|
|
67
|
+
id: id,
|
|
68
|
+
display: display
|
|
69
|
+
}, props), children);
|
|
70
|
+
};
|
|
71
|
+
var _default = exports.default = FunctionDesign;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
11
|
+
var _excluded = ["children"];
|
|
12
|
+
var FunctionLive = function FunctionLive(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, props, children);
|
|
16
|
+
};
|
|
17
|
+
var _default = exports.default = FunctionLive;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
11
|
+
var _excluded = ["children"];
|
|
12
|
+
var FunctionPreview = function FunctionPreview(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, props, children);
|
|
16
|
+
};
|
|
17
|
+
var _default = exports.default = FunctionPreview;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _ahooks = require("ahooks");
|
|
11
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
|
+
var _base = require("@luck-design-biz/base");
|
|
13
|
+
var _Wrapper = _interopRequireDefault(require("../Wrapper"));
|
|
14
|
+
var StyledLayout = (0, _styledComponents.default)(_base.Layout).withConfig({
|
|
15
|
+
displayName: "StyledLayout",
|
|
16
|
+
componentId: "luckda-6530__sc-1igjuug-0"
|
|
17
|
+
})(["", ""], function (props) {
|
|
18
|
+
return props.$css;
|
|
19
|
+
});
|
|
20
|
+
var LCPageLayout = function LCPageLayout(_ref) {
|
|
21
|
+
var id = _ref.id,
|
|
22
|
+
children = _ref.children,
|
|
23
|
+
css = _ref.css,
|
|
24
|
+
display = _ref.display;
|
|
25
|
+
var ref = (0, _react.useRef)();
|
|
26
|
+
var getTargetDom = (0, _ahooks.useMemoizedFn)(function () {
|
|
27
|
+
return ref.current;
|
|
28
|
+
});
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement(_Wrapper.default, {
|
|
30
|
+
id: id,
|
|
31
|
+
displayName: "PageLayout",
|
|
32
|
+
getTargetDom: getTargetDom
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(StyledLayout, {
|
|
34
|
+
wrapperRef: ref,
|
|
35
|
+
$css: css
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement(_base.Layout.Sider, null, children === null || children === void 0 ? void 0 : children[0]), /*#__PURE__*/_react.default.createElement(_base.Layout.Main, null, (children === null || children === void 0 ? void 0 : children.length) === display.split('').length ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, display === 'lr' ? children === null || children === void 0 ? void 0 : children[1] : /*#__PURE__*/_react.default.createElement(_base.MemorySplit, {
|
|
37
|
+
split: display === 'ltb' ? 'horizontal' : 'vertical'
|
|
38
|
+
}, children === null || children === void 0 ? void 0 : children[1], children === null || children === void 0 ? void 0 : children[2])) : null)));
|
|
39
|
+
};
|
|
40
|
+
var _default = exports.default = LCPageLayout;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "PageLayout",
|
|
3
|
+
"name": "页面布局容器",
|
|
4
|
+
"icon": "icon-pagelayout",
|
|
5
|
+
"group": "container",
|
|
6
|
+
"groupName": "布局",
|
|
7
|
+
"desc": "页面布局容器一般用于构建页面时根节点的基础布局,分为左右布局、左上下布局以及左中右布局。",
|
|
8
|
+
"order": 1,
|
|
9
|
+
"props": [
|
|
10
|
+
{
|
|
11
|
+
"key": "id",
|
|
12
|
+
"name": "唯一标识",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"disabled": true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"key": "displaySetting",
|
|
18
|
+
"name": "展现形式",
|
|
19
|
+
"type": "group",
|
|
20
|
+
"props": [
|
|
21
|
+
{
|
|
22
|
+
"key": "display",
|
|
23
|
+
"name": "#展现形式",
|
|
24
|
+
"type": "_PageLayoutDisplay",
|
|
25
|
+
"default": "lr"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"css": "width: 100%, height: 100%, background-color: transparent",
|
|
31
|
+
"advance": {
|
|
32
|
+
"events": [
|
|
33
|
+
{
|
|
34
|
+
"key": "onMount",
|
|
35
|
+
"name": "组件首次渲染时",
|
|
36
|
+
"desc": "在组件首次渲染时,执行方法",
|
|
37
|
+
"func": "function onMount() {\n\t\n}"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"key": "onUnmount",
|
|
41
|
+
"name": "组件卸载时",
|
|
42
|
+
"desc": "在组件卸载时,执行方法。",
|
|
43
|
+
"func": "function onUnmount() {\n\t\n}"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -5,26 +5,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
8
|
var _lodash = require("lodash");
|
|
10
9
|
var _ContextProvider = require("../../../engine/provider/ContextProvider");
|
|
11
10
|
var _useCanvasRender = _interopRequireDefault(require("../../../engine/tools/useCanvasRender"));
|
|
12
11
|
var _constants = require("../../../constants");
|
|
13
12
|
var PageModal = function PageModal() {
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
result.children.push(childId);
|
|
13
|
+
var pagemodal = (0, _ContextProvider.useGet)(function (pagedata) {
|
|
14
|
+
return (0, _lodash.reduce)(pagedata === null || pagedata === void 0 ? void 0 : pagedata.children, function (result, childId) {
|
|
15
|
+
if (!_constants.LC_BUILDIN_UNIT_KEY_LIST.includes(childId)) {
|
|
16
|
+
result[childId] = pagedata[childId];
|
|
17
|
+
if (!result.children) {
|
|
18
|
+
result.children = [];
|
|
22
19
|
}
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
result.children.push(childId);
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
}, {});
|
|
24
|
+
});
|
|
28
25
|
return (0, _useCanvasRender.default)(pagemodal);
|
|
29
26
|
};
|
|
30
27
|
var _default = exports.default = PageModal;
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
11
|
var _react = _interopRequireDefault(require("react"));
|
|
13
12
|
var _index = _interopRequireDefault(require("./index"));
|
|
@@ -22,20 +21,15 @@ var FunctionDesign = function FunctionDesign(_ref) {
|
|
|
22
21
|
id = _ref.id,
|
|
23
22
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
24
23
|
var ctx = (0, _ContextProvider.useContext)();
|
|
25
|
-
var _usePageData = (0, _ContextProvider.usePageData)(),
|
|
26
|
-
_usePageData2 = (0, _slicedToArray2.default)(_usePageData, 2),
|
|
27
|
-
setPageData = _usePageData2[1].setPageData;
|
|
28
24
|
(0, _ahooks.useCreation)(function () {
|
|
29
25
|
if (children !== null && children !== void 0 && children.length) return;
|
|
30
26
|
ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
|
|
31
|
-
var compId = _ref2.id
|
|
32
|
-
pageData = _ref2.pageData;
|
|
27
|
+
var compId = _ref2.id;
|
|
33
28
|
if (compId !== id) return;
|
|
34
29
|
var boxId = "box_".concat((0, _utils.suid)());
|
|
35
|
-
(0,
|
|
30
|
+
(0, _ContextProvider.addNode)(id, boxId, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _boxPropsDefault.default), {}, {
|
|
36
31
|
buildIn: true
|
|
37
32
|
}));
|
|
38
|
-
setPageData(pageData);
|
|
39
33
|
}).watch();
|
|
40
34
|
}, []);
|
|
41
35
|
return /*#__PURE__*/_react.default.createElement(_index.default, (0, _extends2.default)({
|
|
@@ -94,13 +94,13 @@
|
|
|
94
94
|
"key": "onMount",
|
|
95
95
|
"name": "组件首次渲染时",
|
|
96
96
|
"desc": "在组件首次渲染时,执行方法",
|
|
97
|
-
"func": "(
|
|
97
|
+
"func": "function onMount(){\n\t\n}"
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"key": "onUnmount",
|
|
101
101
|
"name": "组件卸载时",
|
|
102
102
|
"desc": "在组件卸载时,执行方法。",
|
|
103
|
-
"func": "(
|
|
103
|
+
"func": "function onUnmount()=>{\n\t\n}"
|
|
104
104
|
}
|
|
105
105
|
]
|
|
106
106
|
}
|