@luck-design-biz/luckda 1.0.0-alpha → 1.0.1
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/Builder/index.js +15 -3
- package/es/components/ComplexItem/index.js +65 -49
- package/es/components/LdAutoForm/index.js +4 -3
- package/es/components/LdFormList/index.js +3 -6
- package/es/components/LdGridForm/index.js +2 -1
- package/es/helper/form.js +1 -0
- package/es/helper/ldBuilder.js +8 -3
- package/es/locales/zh-CN.js +38 -4
- package/es/lowcode/constants/event-topics.js +0 -2
- package/es/lowcode/engine/launcher.js +3 -1
- package/es/lowcode/engine/meta/box.props.json +3 -3
- package/es/lowcode/engine/meta/button.props.default.json +1 -1
- package/es/lowcode/engine/meta/button.props.json +2 -2
- package/es/lowcode/engine/meta/dialog.props.json +2 -2
- package/es/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
- package/es/lowcode/engine/meta/fieldcomplex.props.json +7 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +2 -0
- package/es/lowcode/engine/meta/fielddate.props.json +4 -2
- package/es/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
- package/es/lowcode/engine/meta/fieldnumber.props.json +3 -2
- package/es/lowcode/engine/meta/fielduser.props.default.json +1 -1
- package/es/lowcode/engine/meta/fielduser.props.json +1 -1
- package/es/lowcode/engine/meta/form.props.default.json +0 -1
- package/es/lowcode/engine/meta/form.props.json +4 -5
- package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/es/lowcode/engine/meta/iframe.props.json +1 -1
- package/es/lowcode/engine/meta/image.props.default.json +1 -1
- package/es/lowcode/engine/meta/image.props.json +1 -1
- package/es/lowcode/engine/meta/imex.props.default.json +2 -1
- package/es/lowcode/engine/meta/imex.props.json +26 -5
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +38 -20
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/es/lowcode/engine/meta/jsx.props.json +1 -1
- package/es/lowcode/engine/meta/layout.props.default.json +1 -1
- package/es/lowcode/engine/meta/layout.props.json +5 -5
- package/es/lowcode/engine/meta/link.props.default.json +1 -1
- package/es/lowcode/engine/meta/link.props.json +1 -1
- package/es/lowcode/engine/meta/page.props.json +6 -0
- package/es/lowcode/engine/meta/pagelayout.props.default.json +1 -1
- package/es/lowcode/engine/meta/pagelayout.props.json +1 -1
- package/es/lowcode/engine/meta/section.props.json +2 -1
- package/es/lowcode/engine/meta/split.props.default.json +1 -1
- package/es/lowcode/engine/meta/split.props.json +1 -1
- package/es/lowcode/engine/meta/table.props.json +2 -2
- package/es/lowcode/engine/meta/text.props.default.json +4 -2
- package/es/lowcode/engine/meta/text.props.json +8 -6
- package/es/lowcode/engine/provider/ContextProvider/index.js +63 -46
- package/es/lowcode/engine/provider/ContextProvider/router.js +43 -0
- package/es/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
- package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -15
- package/es/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
- package/es/lowcode/engine/provider/ContextProvider/utils.js +157 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +1 -2
- package/es/lowcode/engine/tools/helper.js +7 -2
- package/es/lowcode/engine/tools/initDS.js +263 -0
- package/es/lowcode/engine/tools/useCombinedRefs.js +3 -2
- package/es/lowcode/painter/DesignOperator.js +10 -1
- package/es/lowcode/painter/Panel.js +2 -2
- package/es/lowcode/painter/components/AdvancePanel.js +3 -3
- package/es/lowcode/painter/components/Collapse.js +5 -2
- package/es/lowcode/painter/components/TipIcon.js +16 -0
- package/es/lowcode/painter/components/VarEditor.js +456 -0
- package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +2 -2
- package/es/lowcode/painter/components/code-editor/JSEditor.js +3 -1
- package/es/lowcode/painter/components/code-editor/VisionEditor.js +81 -0
- package/es/lowcode/painter/components/field-setting/SettingUI.js +17 -3
- package/es/lowcode/painter/components/field-setting/index.js +1 -1
- package/es/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
- package/es/lowcode/painter/index.js +1 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +20 -6
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
- package/es/lowcode/painter/panel-section/ComplexPop.js +242 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +8 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +29 -3
- package/es/lowcode/painter/panel-section/I18nInput.js +4 -2
- package/es/lowcode/painter/panel-section/Icon.js +9 -4
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +7 -7
- package/es/lowcode/painter/panel-section/IconSelector.js +1 -1
- package/es/lowcode/painter/panel-section/ImpExp.js +1 -27
- package/es/lowcode/painter/panel-section/ImpExpAlone.js +1 -2
- package/es/lowcode/painter/panel-section/LayoutRatio.js +1 -0
- package/es/lowcode/painter/panel-section/PageVars.js +300 -0
- package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +4 -3
- package/es/lowcode/painter/panel-section/TabItems.js +6 -42
- package/es/lowcode/painter/panel-section/TextContent.js +79 -0
- package/es/lowcode/painter/services/complexPop.js +21 -0
- package/es/lowcode/painter/style/design.less +1 -1
- package/es/lowcode/painter/style/page-vars.less +25 -0
- package/es/lowcode/preview/index.js +1 -0
- package/es/lowcode/view/Canvas.js +24 -22
- package/es/lowcode/view/Loading.js +5 -7
- package/es/lowcode/view/Page.js +37 -15
- package/es/lowcode/view/index.js +1 -0
- package/es/lowcode/view/lc-components/Box/index.js +18 -3
- package/es/lowcode/view/lc-components/Box/meta.json +3 -3
- package/es/lowcode/view/lc-components/Button/index.js +7 -7
- package/es/lowcode/view/lc-components/Button/meta.json +2 -2
- package/es/lowcode/view/lc-components/Dialog/index.js +6 -7
- package/es/lowcode/view/lc-components/Dialog/meta.json +2 -2
- package/es/lowcode/view/lc-components/FieldComplex/meta.json +7 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +4 -2
- package/es/lowcode/view/lc-components/FieldNumber/meta.json +3 -2
- package/es/lowcode/view/lc-components/FieldUser/meta.json +1 -1
- package/es/lowcode/view/lc-components/Form/index.js +14 -6
- package/es/lowcode/view/lc-components/Form/meta.json +4 -5
- package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/es/lowcode/view/lc-components/ImEx/index.js +174 -103
- package/es/lowcode/view/lc-components/ImEx/meta.json +26 -5
- package/es/lowcode/view/lc-components/Image/meta.json +1 -1
- package/es/lowcode/view/lc-components/JSX/meta.json +1 -1
- package/es/lowcode/view/lc-components/Layout/index.js +22 -5
- package/es/lowcode/view/lc-components/Layout/meta.json +5 -5
- package/es/lowcode/view/lc-components/Link/meta.json +1 -1
- package/es/lowcode/view/lc-components/Page/meta.json +6 -0
- package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
- package/es/lowcode/view/lc-components/PageLayout/meta.json +1 -1
- package/es/lowcode/view/lc-components/Section/index.js +2 -6
- package/es/lowcode/view/lc-components/Section/meta.json +2 -1
- package/es/lowcode/view/lc-components/Split/index.js +19 -4
- package/es/lowcode/view/lc-components/Split/meta.json +1 -1
- package/es/lowcode/view/lc-components/Table/index.js +29 -3
- package/es/lowcode/view/lc-components/Table/meta.json +2 -2
- package/es/lowcode/view/lc-components/Tabs/index.js +19 -16
- package/es/lowcode/view/lc-components/Text/index.js +9 -2
- package/es/lowcode/view/lc-components/Text/meta.json +6 -6
- package/es/lowcode/view/lc-components/Wrapper.js +17 -2
- package/es/lowcode/view/style/loading.less +14 -0
- package/es/services.js +19 -0
- package/es/upload/Form/gridForm.js +17 -7
- package/es/upload/FormItem/index.js +6 -6
- package/es/utils/form.js +4 -4
- package/es/utils/grid.js +2 -1
- package/lib/components/Builder/index.js +13 -1
- package/lib/components/ComplexItem/index.js +62 -47
- package/lib/components/LdAutoForm/index.js +3 -2
- package/lib/components/LdFormList/index.js +5 -8
- package/lib/components/LdGridForm/index.js +2 -1
- package/lib/helper/form.js +1 -0
- package/lib/helper/ldBuilder.js +8 -3
- package/lib/locales/zh-CN.js +38 -4
- package/lib/lowcode/constants/event-topics.js +1 -3
- package/lib/lowcode/engine/launcher.js +3 -1
- package/lib/lowcode/engine/meta/box.props.json +3 -3
- package/lib/lowcode/engine/meta/button.props.default.json +1 -1
- package/lib/lowcode/engine/meta/button.props.json +2 -2
- package/lib/lowcode/engine/meta/dialog.props.json +2 -2
- package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fieldcomplex.props.json +7 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +2 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +4 -2
- package/lib/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fieldnumber.props.json +3 -2
- package/lib/lowcode/engine/meta/fielduser.props.default.json +1 -1
- package/lib/lowcode/engine/meta/fielduser.props.json +1 -1
- package/lib/lowcode/engine/meta/form.props.default.json +0 -1
- package/lib/lowcode/engine/meta/form.props.json +4 -5
- package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
- package/lib/lowcode/engine/meta/iframe.props.json +1 -1
- package/lib/lowcode/engine/meta/image.props.default.json +1 -1
- package/lib/lowcode/engine/meta/image.props.json +1 -1
- package/lib/lowcode/engine/meta/imex.props.default.json +2 -1
- package/lib/lowcode/engine/meta/imex.props.json +26 -5
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +38 -20
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -1
- package/lib/lowcode/engine/meta/jsx.props.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.json +5 -5
- package/lib/lowcode/engine/meta/link.props.default.json +1 -1
- package/lib/lowcode/engine/meta/link.props.json +1 -1
- package/lib/lowcode/engine/meta/page.props.json +6 -0
- package/lib/lowcode/engine/meta/pagelayout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/pagelayout.props.json +1 -1
- package/lib/lowcode/engine/meta/section.props.json +2 -1
- package/lib/lowcode/engine/meta/split.props.default.json +1 -1
- package/lib/lowcode/engine/meta/split.props.json +1 -1
- package/lib/lowcode/engine/meta/table.props.json +2 -2
- package/lib/lowcode/engine/meta/text.props.default.json +4 -2
- package/lib/lowcode/engine/meta/text.props.json +8 -6
- package/lib/lowcode/engine/provider/ContextProvider/index.js +61 -44
- package/lib/lowcode/engine/provider/ContextProvider/router.js +57 -0
- package/lib/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
- package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -16
- package/lib/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
- package/lib/lowcode/engine/provider/ContextProvider/utils.js +170 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +2 -3
- package/lib/lowcode/engine/tools/helper.js +7 -2
- package/lib/lowcode/engine/tools/initDS.js +270 -0
- package/lib/lowcode/engine/tools/useCombinedRefs.js +2 -1
- package/lib/lowcode/painter/DesignOperator.js +9 -0
- package/lib/lowcode/painter/Panel.js +2 -2
- package/lib/lowcode/painter/components/AdvancePanel.js +3 -3
- package/lib/lowcode/painter/components/Collapse.js +5 -2
- package/lib/lowcode/painter/components/TipIcon.js +23 -0
- package/lib/lowcode/painter/components/VarEditor.js +463 -0
- package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +2 -2
- package/lib/lowcode/painter/components/code-editor/JSEditor.js +3 -1
- package/lib/lowcode/painter/components/code-editor/VisionEditor.js +88 -0
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +17 -3
- package/lib/lowcode/painter/components/field-setting/index.js +1 -1
- package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
- package/lib/lowcode/painter/index.js +1 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +19 -5
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
- package/lib/lowcode/painter/panel-section/ComplexPop.js +250 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +8 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +29 -3
- package/lib/lowcode/painter/panel-section/I18nInput.js +4 -2
- package/lib/lowcode/painter/panel-section/Icon.js +8 -3
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +6 -6
- package/lib/lowcode/painter/panel-section/IconSelector.js +1 -1
- package/lib/lowcode/painter/panel-section/ImpExp.js +0 -26
- package/lib/lowcode/painter/panel-section/ImpExpAlone.js +0 -1
- package/lib/lowcode/painter/panel-section/LayoutRatio.js +1 -0
- package/lib/lowcode/painter/panel-section/PageVars.js +308 -0
- package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +4 -3
- package/lib/lowcode/painter/panel-section/TabItems.js +6 -42
- package/lib/lowcode/painter/panel-section/TextContent.js +87 -0
- package/lib/lowcode/painter/services/complexPop.js +28 -0
- package/lib/lowcode/painter/style/design.less +1 -1
- package/lib/lowcode/painter/style/page-vars.less +25 -0
- package/lib/lowcode/preview/index.js +1 -0
- package/lib/lowcode/view/Canvas.js +24 -22
- package/lib/lowcode/view/Loading.js +5 -7
- package/lib/lowcode/view/Page.js +35 -13
- package/lib/lowcode/view/index.js +1 -0
- package/lib/lowcode/view/lc-components/Box/index.js +17 -2
- package/lib/lowcode/view/lc-components/Box/meta.json +3 -3
- package/lib/lowcode/view/lc-components/Button/index.js +5 -5
- package/lib/lowcode/view/lc-components/Button/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Dialog/index.js +6 -7
- package/lib/lowcode/view/lc-components/Dialog/meta.json +2 -2
- package/lib/lowcode/view/lc-components/FieldComplex/meta.json +7 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +4 -2
- package/lib/lowcode/view/lc-components/FieldNumber/meta.json +3 -2
- package/lib/lowcode/view/lc-components/FieldUser/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Form/index.js +14 -6
- package/lib/lowcode/view/lc-components/Form/meta.json +4 -5
- package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
- package/lib/lowcode/view/lc-components/ImEx/index.js +172 -101
- package/lib/lowcode/view/lc-components/ImEx/meta.json +26 -5
- package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
- package/lib/lowcode/view/lc-components/JSX/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Layout/index.js +21 -4
- package/lib/lowcode/view/lc-components/Layout/meta.json +5 -5
- package/lib/lowcode/view/lc-components/Link/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Page/meta.json +6 -0
- package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
- package/lib/lowcode/view/lc-components/PageLayout/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Section/index.js +2 -6
- package/lib/lowcode/view/lc-components/Section/meta.json +2 -1
- package/lib/lowcode/view/lc-components/Split/index.js +18 -3
- package/lib/lowcode/view/lc-components/Split/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Table/index.js +30 -4
- package/lib/lowcode/view/lc-components/Table/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Tabs/index.js +17 -14
- package/lib/lowcode/view/lc-components/Text/index.js +8 -1
- package/lib/lowcode/view/lc-components/Text/meta.json +6 -6
- package/lib/lowcode/view/lc-components/Wrapper.js +16 -1
- package/lib/lowcode/view/style/loading.less +14 -0
- package/lib/services.js +20 -0
- package/lib/upload/Form/gridForm.js +17 -7
- package/lib/upload/FormItem/index.js +6 -6
- package/lib/utils/form.js +3 -3
- package/lib/utils/grid.js +2 -1
- package/package.json +3 -3
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"group": "basic",
|
|
7
7
|
"groupName": "基础",
|
|
8
8
|
"order": 1,
|
|
9
|
-
"css":
|
|
9
|
+
"css": "",
|
|
10
10
|
"title": "导入|导出",
|
|
11
11
|
"impexpSetting": {
|
|
12
12
|
"customType": false,
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"size": "middle",
|
|
17
17
|
"block": false,
|
|
18
18
|
"type": "primary",
|
|
19
|
+
"serialEffect": "hidden",
|
|
19
20
|
"advance": {
|
|
20
21
|
"events": {}
|
|
21
22
|
}
|
|
@@ -80,34 +80,55 @@
|
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
82
|
"repositioning": true
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"key": "serials",
|
|
86
|
+
"name": "资源串",
|
|
87
|
+
"type": "_SerialsSelector"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"key": "serialEffect",
|
|
91
|
+
"name": "越权效果",
|
|
92
|
+
"type": "segmented",
|
|
93
|
+
"options": [
|
|
94
|
+
{
|
|
95
|
+
"label": "禁用",
|
|
96
|
+
"value": "disable"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"label": "隐藏",
|
|
100
|
+
"value": "hidden"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"default": "hidden"
|
|
83
104
|
}
|
|
84
105
|
],
|
|
85
|
-
"css":
|
|
106
|
+
"css": "",
|
|
86
107
|
"advance": {
|
|
87
108
|
"events": [
|
|
88
109
|
{
|
|
89
110
|
"key": "onMount",
|
|
90
111
|
"name": "组件首次渲染时",
|
|
91
112
|
"desc": "在组件首次渲染时,执行方法",
|
|
92
|
-
"func": "(
|
|
113
|
+
"func": "function onMount() {\n\t\n}"
|
|
93
114
|
},
|
|
94
115
|
{
|
|
95
116
|
"key": "onUnmount",
|
|
96
117
|
"name": "组件卸载时",
|
|
97
118
|
"desc": "在组件卸载时,执行方法。",
|
|
98
|
-
"func": "(
|
|
119
|
+
"func": "function onUnmount() {\n\t\n}"
|
|
99
120
|
},
|
|
100
121
|
{
|
|
101
122
|
"key": "beforeExe",
|
|
102
123
|
"name": "操作执行前",
|
|
103
124
|
"desc": "在导入或导出执行前,执行方法,promise反回false截断执行",
|
|
104
|
-
"func": "(
|
|
125
|
+
"func": "function beforeExe() {\n\t\n}"
|
|
105
126
|
},
|
|
106
127
|
{
|
|
107
128
|
"key": "afterExe",
|
|
108
129
|
"name": "操作执行后",
|
|
109
130
|
"desc": "在导入或导出执行后,执行方法",
|
|
110
|
-
"func": "(
|
|
131
|
+
"func": "function afterExe(success) {\n\t\n}"
|
|
111
132
|
}
|
|
112
133
|
]
|
|
113
134
|
}
|
|
@@ -166,6 +166,12 @@
|
|
|
166
166
|
"kind": "method",
|
|
167
167
|
"insertText": "getInstance",
|
|
168
168
|
"documentation": " /**\r\n * 获取表格实例\r\n * @method\r\n */\r"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"label": "refresh",
|
|
172
|
+
"kind": "method",
|
|
173
|
+
"insertText": "refresh",
|
|
174
|
+
"documentation": " /**\r\n * 刷新表格\r\n * @method\r\n */\r"
|
|
169
175
|
}
|
|
170
176
|
]
|
|
171
177
|
},
|
|
@@ -194,30 +200,30 @@
|
|
|
194
200
|
"insertText": "loading",
|
|
195
201
|
"documentation": " /**\r\n * @property {boolean} loading - loading状态\r\n */\r"
|
|
196
202
|
},
|
|
197
|
-
{
|
|
198
|
-
"label": "history",
|
|
199
|
-
"kind": "property",
|
|
200
|
-
"insertText": "history",
|
|
201
|
-
"documentation": " /**\r\n * @property {object} history - 当前路由信息\r\n */\r"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"label": "callBehavior",
|
|
205
|
-
"kind": "method",
|
|
206
|
-
"insertText": "callBehavior(evns, params, data)",
|
|
207
|
-
"documentation": " /**\r\n * @method - 执行行为接口\r\n * @param {object} evns - moduleCode: 模块编码,datasetCode:数据集编码,behaviorKey:行为key\r\n * @param {object} params - 链接参数\r\n * @param {object} data - body参数\r\n */\r"
|
|
208
|
-
},
|
|
209
203
|
{
|
|
210
204
|
"label": "topics",
|
|
211
205
|
"kind": "property",
|
|
212
206
|
"insertText": "topics",
|
|
213
207
|
"documentation": " /**\r\n * @property {object} topics - 内置的事件话题\r\n */\r"
|
|
214
208
|
},
|
|
209
|
+
{
|
|
210
|
+
"label": "API_PREFIX",
|
|
211
|
+
"kind": "property",
|
|
212
|
+
"insertText": "API_PREFIX",
|
|
213
|
+
"documentation": " /**\r\n * @property {object} topics - service api前缀\r\n */\r"
|
|
214
|
+
},
|
|
215
215
|
{
|
|
216
216
|
"label": "PRIMARY_KEY",
|
|
217
217
|
"kind": "property",
|
|
218
218
|
"insertText": "PRIMARY_KEY",
|
|
219
219
|
"documentation": " /**\r\n * @property {string} PRIMARY_KEY - 主键key\r\n */\r"
|
|
220
220
|
},
|
|
221
|
+
{
|
|
222
|
+
"label": "PARENT_KEY",
|
|
223
|
+
"kind": "property",
|
|
224
|
+
"insertText": "PARENT_KEY",
|
|
225
|
+
"documentation": " /**\r\n * @property {string} PARENT_KEY - 树组件主键key\r\n */\r"
|
|
226
|
+
},
|
|
221
227
|
{
|
|
222
228
|
"label": "getElementById",
|
|
223
229
|
"kind": "method",
|
|
@@ -225,9 +231,9 @@
|
|
|
225
231
|
"documentation": " /**\r\n * @method - 根据组件ID获取实例\r\n * @param {string} compId - 组件ID\r\n * @return {object} target - 组件实例\r\n */\r"
|
|
226
232
|
},
|
|
227
233
|
{
|
|
228
|
-
"label": "
|
|
234
|
+
"label": "getParentElementById",
|
|
229
235
|
"kind": "method",
|
|
230
|
-
"insertText": "
|
|
236
|
+
"insertText": "getParentElementById(compId)",
|
|
231
237
|
"documentation": " /**\r\n * @method - 根据组件ID获取父组件实例\r\n * @param {string} compId - 组件ID\r\n * @return {object} target - 父组件实例\r\n */\r"
|
|
232
238
|
},
|
|
233
239
|
{
|
|
@@ -236,17 +242,29 @@
|
|
|
236
242
|
"insertText": "doAction(actionPool, args)",
|
|
237
243
|
"documentation": " /**\r\n * @method - 执行行为池\r\n * @param {object} actionPool - 行为池\r\n * @param {object} args - 参数\r\n */\r"
|
|
238
244
|
},
|
|
239
|
-
{
|
|
240
|
-
"label": "getUrlParams",
|
|
241
|
-
"kind": "method",
|
|
242
|
-
"insertText": "getUrlParams",
|
|
243
|
-
"documentation": " /**\r\n * @method - 获取URL参数\r\n * @return {object} params - url参数\r\n */\r"
|
|
244
|
-
},
|
|
245
245
|
{
|
|
246
246
|
"label": "want",
|
|
247
247
|
"kind": "method",
|
|
248
248
|
"insertText": "want",
|
|
249
249
|
"documentation": " /**\r\n * @method - 是否有权限\r\n * @return {string} wanted - 期望的资源串\r\n */\r"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"label": "getBehaviorUrl",
|
|
253
|
+
"kind": "method",
|
|
254
|
+
"insertText": "getBehaviorUrl",
|
|
255
|
+
"documentation": " /**\r\n * @method - 获取执行行为请求的接口URL\r\n * @return {string} BEHAVIOR_URL - 执行行为请求的接口URL\r\n */\r"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"label": "utils",
|
|
259
|
+
"kind": "property",
|
|
260
|
+
"insertText": "utils",
|
|
261
|
+
"documentation": " /**\r\n * @property {Utils} 工具类\r\n */\r"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"label": "router",
|
|
265
|
+
"kind": "property",
|
|
266
|
+
"insertText": "router",
|
|
267
|
+
"documentation": " /**\r\n * @property {Router} router - 路由\r\n */\r"
|
|
250
268
|
}
|
|
251
269
|
]
|
|
252
270
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
{
|
|
24
24
|
"key": "columnSpacing",
|
|
25
25
|
"name": "列间距",
|
|
26
|
-
"desc": "
|
|
26
|
+
"desc": "表示一行中分栏与分栏之间的间距",
|
|
27
27
|
"type": "select",
|
|
28
28
|
"options": [
|
|
29
29
|
{
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
{
|
|
57
57
|
"key": "lineSpacing",
|
|
58
58
|
"name": "行间距",
|
|
59
|
-
"desc": "
|
|
59
|
+
"desc": "表示每一行之间的间距",
|
|
60
60
|
"type": "select",
|
|
61
61
|
"options": [
|
|
62
62
|
{
|
|
@@ -87,20 +87,20 @@
|
|
|
87
87
|
"default": 16
|
|
88
88
|
}
|
|
89
89
|
],
|
|
90
|
-
"css":
|
|
90
|
+
"css": "background-color: transparent;",
|
|
91
91
|
"advance": {
|
|
92
92
|
"events": [
|
|
93
93
|
{
|
|
94
94
|
"key": "onMount",
|
|
95
95
|
"name": "组件首次渲染时",
|
|
96
96
|
"desc": "在组件首次渲染时,执行方法",
|
|
97
|
-
"func": "function onMount(
|
|
97
|
+
"func": "function onMount() {\n\t\n}"
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"key": "onUnmount",
|
|
101
101
|
"name": "组件卸载时",
|
|
102
102
|
"desc": "在组件卸载时,执行方法。",
|
|
103
|
-
"func": "function onUnmount(
|
|
103
|
+
"func": "function onUnmount() {\n\t\n}"
|
|
104
104
|
}
|
|
105
105
|
]
|
|
106
106
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"groupName": "布局",
|
|
7
7
|
"desc": "页面布局容器一般用于构建页面时根节点的基础布局,分为左右布局、左上下布局以及左中右布局。",
|
|
8
8
|
"order": 1,
|
|
9
|
-
"css": "width: 100%; height: 100%; background-color: transparent",
|
|
9
|
+
"css": "width: 100%; height: 100%; background-color: transparent;",
|
|
10
10
|
"width": "100%",
|
|
11
11
|
"height": "100%",
|
|
12
12
|
"display": "lr",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"groupName": "布局",
|
|
7
7
|
"desc": "分割面板容器是一种可以通过拖拽分割线调整面板大小的容器组件,用于创建页面布局或需要调整可视区域的布局场景",
|
|
8
8
|
"order": 1,
|
|
9
|
-
"css": "width: 100
|
|
9
|
+
"css": "width: 100%; height: 100%; background-color: transparent;",
|
|
10
10
|
"display": {
|
|
11
11
|
"type": "normal",
|
|
12
12
|
"split": "horizontal",
|
|
@@ -384,13 +384,13 @@
|
|
|
384
384
|
"key": "onMount",
|
|
385
385
|
"name": "组件首次渲染时",
|
|
386
386
|
"desc": "在组件首次渲染时,执行方法",
|
|
387
|
-
"func": "function onMount(params) {\n\t\n}"
|
|
387
|
+
"func": "function onMount(params, datasetCode) {\n\t\n}"
|
|
388
388
|
},
|
|
389
389
|
{
|
|
390
390
|
"key": "onUnmount",
|
|
391
391
|
"name": "组件卸载时",
|
|
392
392
|
"desc": "在组件卸载时,执行方法。",
|
|
393
|
-
"func": "function onUnmount() {\n\t\n}"
|
|
393
|
+
"func": "function onUnmount(datasetCode) {\n\t\n}"
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
396
|
"key": "onRowClick",
|
|
@@ -15,22 +15,24 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"key": "content",
|
|
18
|
-
"name": "
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
18
|
+
"name": "#内容",
|
|
19
|
+
"type": "_TextContent",
|
|
20
|
+
"default": {
|
|
21
|
+
"text": "文本内容"
|
|
22
|
+
},
|
|
22
23
|
"wrapped": "textarea",
|
|
24
|
+
"wrapper": "hidden",
|
|
23
25
|
"repositioning": true
|
|
24
26
|
},
|
|
25
27
|
{
|
|
26
28
|
"key": "maxLine",
|
|
27
29
|
"name": "最大行数",
|
|
28
|
-
"desc": "
|
|
30
|
+
"desc": "超出时自动省略号展示,0表示不限制行数",
|
|
29
31
|
"type": "number",
|
|
30
32
|
"default": 0
|
|
31
33
|
}
|
|
32
34
|
],
|
|
33
|
-
"css":
|
|
35
|
+
"css": "",
|
|
34
36
|
"advance": {
|
|
35
37
|
"events": [
|
|
36
38
|
{
|
|
@@ -14,15 +14,13 @@ exports.useRemoteSource = exports.useContext = exports.default = exports.Context
|
|
|
14
14
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
var _umi = require("umi");
|
|
18
17
|
var _ahooks = require("ahooks");
|
|
19
18
|
var _lodash = require("lodash");
|
|
20
|
-
var _diff2 = _interopRequireDefault(require("../../tools/diff"));
|
|
21
19
|
var _EventBusProvider = require("../EventBusProvider");
|
|
22
20
|
var _RemoteSourceProvider = _interopRequireWildcard(require("../RemoteSourceProvider"));
|
|
23
21
|
var _usePageVar2 = _interopRequireDefault(require("./usePageVar"));
|
|
24
|
-
var _useTodo3 = _interopRequireDefault(require("
|
|
25
|
-
var _usePageDataStore = require("
|
|
22
|
+
var _useTodo3 = _interopRequireDefault(require("./useTodo"));
|
|
23
|
+
var _usePageDataStore = require("./usePageDataStore");
|
|
26
24
|
Object.keys(_usePageDataStore).forEach(function (key) {
|
|
27
25
|
if (key === "default" || key === "__esModule") return;
|
|
28
26
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -34,7 +32,11 @@ Object.keys(_usePageDataStore).forEach(function (key) {
|
|
|
34
32
|
}
|
|
35
33
|
});
|
|
36
34
|
});
|
|
35
|
+
var _ApiConfig = _interopRequireDefault(require("@/services/ApiConfig"));
|
|
36
|
+
var _apiUrl = require("../../../constants/api-url");
|
|
37
37
|
var topics = _interopRequireWildcard(require("../../../constants/event-topics"));
|
|
38
|
+
var utils = _interopRequireWildcard(require("./utils"));
|
|
39
|
+
var router = _interopRequireWildcard(require("./router"));
|
|
38
40
|
var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)(null);
|
|
39
41
|
var useContext = exports.useContext = function useContext() {
|
|
40
42
|
return (0, _react.useContext)(Context);
|
|
@@ -42,30 +44,31 @@ var useContext = exports.useContext = function useContext() {
|
|
|
42
44
|
var useRemoteSource = exports.useRemoteSource = function useRemoteSource() {
|
|
43
45
|
return (0, _react.useContext)(_RemoteSourceProvider.RemoteSourceContext);
|
|
44
46
|
};
|
|
45
|
-
var PRIVATE_KEYS = ['componentList', 'componentMap'];
|
|
47
|
+
var PRIVATE_KEYS = ['componentList', 'componentMap', 'remoteApiMap'];
|
|
46
48
|
var _default = exports.default = function _default(_ref) {
|
|
47
49
|
var children = _ref.children,
|
|
48
50
|
code = _ref.code;
|
|
49
51
|
var eventBus = (0, _EventBusProvider.useLDEventBus)();
|
|
50
52
|
var _useTodo = (0, _useTodo3.default)(),
|
|
51
|
-
_useTodo2 = (0, _slicedToArray2.default)(_useTodo,
|
|
53
|
+
_useTodo2 = (0, _slicedToArray2.default)(_useTodo, 2),
|
|
52
54
|
todo = _useTodo2[0],
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var _usePageVar = (0, _usePageVar2.default)(null, null),
|
|
56
|
-
state = _usePageVar.state,
|
|
57
|
-
prevState = _usePageVar.prevState,
|
|
55
|
+
loading = _useTodo2[1];
|
|
56
|
+
var _usePageVar = (0, _usePageVar2.default)(),
|
|
58
57
|
setState = _usePageVar.setState,
|
|
59
58
|
getState = _usePageVar.getState,
|
|
60
59
|
global = _usePageVar.global,
|
|
61
60
|
setGlobal = _usePageVar.setGlobal;
|
|
62
61
|
var _componentList = (0, _react.useRef)([]);
|
|
62
|
+
var _remoteApiMap = (0, _react.useRef)(new Map());
|
|
63
63
|
var _privateGetter = (0, _react.useRef)({
|
|
64
64
|
componentList: function componentList() {
|
|
65
65
|
return _componentList.current;
|
|
66
66
|
},
|
|
67
67
|
componentMap: function componentMap() {
|
|
68
68
|
return new Map(_componentList.current);
|
|
69
|
+
},
|
|
70
|
+
remoteApiMap: function remoteApiMap() {
|
|
71
|
+
return Object.fromEntries(_remoteApiMap.current.entries());
|
|
69
72
|
}
|
|
70
73
|
});
|
|
71
74
|
var _register = (0, _ahooks.useMemoizedFn)(function (id, component) {
|
|
@@ -78,6 +81,9 @@ var _default = exports.default = function _default(_ref) {
|
|
|
78
81
|
return _id !== id;
|
|
79
82
|
});
|
|
80
83
|
});
|
|
84
|
+
var _initRemoteApiMap = (0, _ahooks.useMemoizedFn)(function (_apiMap) {
|
|
85
|
+
_remoteApiMap.current = _apiMap;
|
|
86
|
+
});
|
|
81
87
|
var getElementById = (0, _ahooks.useMemoizedFn)(function (compId) {
|
|
82
88
|
var _componentList$curren;
|
|
83
89
|
return (_componentList$curren = _componentList.current.find(function (_ref4) {
|
|
@@ -86,15 +92,13 @@ var _default = exports.default = function _default(_ref) {
|
|
|
86
92
|
return compId === _id;
|
|
87
93
|
})) === null || _componentList$curren === void 0 ? void 0 : _componentList$curren[1];
|
|
88
94
|
});
|
|
89
|
-
var
|
|
95
|
+
var getParentElementById = (0, _ahooks.useMemoizedFn)(function (compId) {
|
|
96
|
+
var _target$api$getSelfDa;
|
|
90
97
|
var compMap = new Map(_componentList.current);
|
|
91
98
|
var _target = compMap.get(compId);
|
|
92
|
-
var _parentId = _target.api.getSelfData().parentId;
|
|
99
|
+
var _parentId = (_target$api$getSelfDa = _target.api.getSelfData()) === null || _target$api$getSelfDa === void 0 ? void 0 : _target$api$getSelfDa.props.parentId;
|
|
93
100
|
if (!_parentId) return null;
|
|
94
|
-
return compMap(_parentId);
|
|
95
|
-
});
|
|
96
|
-
var getUrlParams = (0, _ahooks.useMemoizedFn)(function () {
|
|
97
|
-
return _umi.history.location.query;
|
|
101
|
+
return compMap.get(_parentId);
|
|
98
102
|
});
|
|
99
103
|
var want = (0, _ahooks.useMemoizedFn)(function (wanted) {
|
|
100
104
|
var _getModuleData;
|
|
@@ -112,53 +116,42 @@ var _default = exports.default = function _default(_ref) {
|
|
|
112
116
|
}, 0);
|
|
113
117
|
return (serialsValue & (serialMap[wanted] || 0)) === 1;
|
|
114
118
|
});
|
|
115
|
-
(0, _ahooks.useUpdateEffect)(function () {
|
|
116
|
-
var _diff = (0, _diff2.default)(prevState, state);
|
|
117
|
-
eventBus.$publisher(topics.PAGE_STATE_CHANGED, {
|
|
118
|
-
state: state,
|
|
119
|
-
prevState: prevState,
|
|
120
|
-
diff: _diff
|
|
121
|
-
});
|
|
122
|
-
}, [state, prevState]);
|
|
123
119
|
var ctx = new Proxy((0, _objectSpread2.default)({
|
|
124
120
|
_register: _register,
|
|
125
121
|
_unregister: _unregister,
|
|
122
|
+
_initRemoteApiMap: _initRemoteApiMap,
|
|
126
123
|
/**
|
|
127
124
|
* @property {boolean} loading - loading状态
|
|
128
125
|
*/
|
|
129
126
|
loading: loading,
|
|
130
|
-
/**
|
|
131
|
-
* @property {object} history - 当前路由信息
|
|
132
|
-
*/
|
|
133
|
-
history: _umi.history,
|
|
134
|
-
/**
|
|
135
|
-
* @method - 执行行为接口
|
|
136
|
-
* @param {object} evns - moduleCode: 模块编码,datasetCode:数据集编码,behaviorKey:行为key
|
|
137
|
-
* @param {object} params - 链接参数
|
|
138
|
-
* @param {object} data - body参数
|
|
139
|
-
*/
|
|
140
|
-
callBehavior: callBehavior,
|
|
141
127
|
/**
|
|
142
128
|
* @property {object} topics - 内置的事件话题
|
|
143
129
|
*/
|
|
144
130
|
topics: topics,
|
|
131
|
+
/**
|
|
132
|
+
* @property {object} topics - service api前缀
|
|
133
|
+
*/
|
|
134
|
+
API_PREFIX: _ApiConfig.default,
|
|
145
135
|
/**
|
|
146
136
|
* @property {string} PRIMARY_KEY - 主键key
|
|
147
137
|
*/
|
|
148
138
|
PRIMARY_KEY: window.appConfig.constraintKeys.PRIMARY,
|
|
139
|
+
/**
|
|
140
|
+
* @property {string} PARENT_KEY - 树组件主键key
|
|
141
|
+
*/
|
|
149
142
|
PARENT_KEY: window.appConfig.constraintKeys.PARENT,
|
|
150
143
|
/**
|
|
151
144
|
* @method - 根据组件ID获取实例
|
|
152
145
|
* @param {string} compId - 组件ID
|
|
153
146
|
* @return {object} target - 组件实例
|
|
154
147
|
*/
|
|
155
|
-
|
|
148
|
+
$: getElementById,
|
|
156
149
|
/**
|
|
157
150
|
* @method - 根据组件ID获取父组件实例
|
|
158
151
|
* @param {string} compId - 组件ID
|
|
159
152
|
* @return {object} target - 父组件实例
|
|
160
153
|
*/
|
|
161
|
-
|
|
154
|
+
$$: getParentElementById,
|
|
162
155
|
/**
|
|
163
156
|
* @method - 执行行为池
|
|
164
157
|
* @param {object} actionPool - 行为池
|
|
@@ -167,16 +160,38 @@ var _default = exports.default = function _default(_ref) {
|
|
|
167
160
|
doAction: function doAction(actionPool, args) {
|
|
168
161
|
return todo(this, actionPool, args);
|
|
169
162
|
},
|
|
170
|
-
/**
|
|
171
|
-
* @method - 获取URL参数
|
|
172
|
-
* @return {object} params - url参数
|
|
173
|
-
*/
|
|
174
|
-
getUrlParams: getUrlParams,
|
|
175
163
|
/**
|
|
176
164
|
* @method - 是否有权限
|
|
177
165
|
* @return {string} wanted - 期望的资源串
|
|
178
166
|
*/
|
|
179
|
-
want: want
|
|
167
|
+
want: want,
|
|
168
|
+
/**
|
|
169
|
+
* @method - 获取执行行为请求的接口URL
|
|
170
|
+
* @return {string} BEHAVIOR_URL - 执行行为请求的接口URL
|
|
171
|
+
*/
|
|
172
|
+
getBehaviorUrl: _apiUrl.getBehaviorUrl,
|
|
173
|
+
/**
|
|
174
|
+
* @typedef {Object} Utils
|
|
175
|
+
* @property {function(type, props): void} dialog - 弹出对话框
|
|
176
|
+
* @property {function({ moduleCode, datasetCode, behaviorKey }, params, data): Promise} callBehavior - 执行行为
|
|
177
|
+
* @property {function(type, value, formatOrSeparator): string} formatter - 常用的 formatter 函数用于进行事件、金额、手机号等 format
|
|
178
|
+
* @property {function(when, type): string} getDateTimeRange - 获取当前或指定日期的开始结束区间时间戳
|
|
179
|
+
*/
|
|
180
|
+
/**
|
|
181
|
+
* @property {Utils} 工具类
|
|
182
|
+
*/
|
|
183
|
+
utils: utils,
|
|
184
|
+
/**
|
|
185
|
+
* @typedef {Object} Router
|
|
186
|
+
* @property {function(path, params): void} push - 跳转
|
|
187
|
+
* @property {function(path, state): void} replace - 替换
|
|
188
|
+
* @property {function{}: object} getQuery - 获取URL参数
|
|
189
|
+
* @property {function(params): string} stringifyQuery - 序列化 URL 参数
|
|
190
|
+
*/
|
|
191
|
+
/**
|
|
192
|
+
* @property {Router} router - 路由
|
|
193
|
+
*/
|
|
194
|
+
router: router
|
|
180
195
|
}, eventBus), {
|
|
181
196
|
get: function get(target, property, receiver) {
|
|
182
197
|
if (PRIVATE_KEYS.includes(property)) {
|
|
@@ -192,6 +207,8 @@ var _default = exports.default = function _default(_ref) {
|
|
|
192
207
|
set: function set(target, property, receiver) {
|
|
193
208
|
if (PRIVATE_KEYS.includes(property)) {
|
|
194
209
|
throw new Error("\u5C5E\u6027 \"".concat(property, "\" \u662F\u53EA\u8BFB\u7684"));
|
|
210
|
+
} else if (property.startsWith('_')) {
|
|
211
|
+
throw new Error("\u5C5E\u6027 \"".concat(property, "\" \u662F\u79C1\u6709\u7684"));
|
|
195
212
|
} else if (property === 'state') {
|
|
196
213
|
setState(receiver);
|
|
197
214
|
return true;
|