@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.
Files changed (265) hide show
  1. package/es/components/Builder/index.js +15 -3
  2. package/es/components/ComplexItem/index.js +65 -49
  3. package/es/components/LdAutoForm/index.js +4 -3
  4. package/es/components/LdFormList/index.js +3 -6
  5. package/es/components/LdGridForm/index.js +2 -1
  6. package/es/helper/form.js +1 -0
  7. package/es/helper/ldBuilder.js +8 -3
  8. package/es/locales/zh-CN.js +38 -4
  9. package/es/lowcode/constants/event-topics.js +0 -2
  10. package/es/lowcode/engine/launcher.js +3 -1
  11. package/es/lowcode/engine/meta/box.props.json +3 -3
  12. package/es/lowcode/engine/meta/button.props.default.json +1 -1
  13. package/es/lowcode/engine/meta/button.props.json +2 -2
  14. package/es/lowcode/engine/meta/dialog.props.json +2 -2
  15. package/es/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
  16. package/es/lowcode/engine/meta/fieldcomplex.props.json +7 -0
  17. package/es/lowcode/engine/meta/fielddate.props.default.json +2 -0
  18. package/es/lowcode/engine/meta/fielddate.props.json +4 -2
  19. package/es/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
  20. package/es/lowcode/engine/meta/fieldnumber.props.json +3 -2
  21. package/es/lowcode/engine/meta/fielduser.props.default.json +1 -1
  22. package/es/lowcode/engine/meta/fielduser.props.json +1 -1
  23. package/es/lowcode/engine/meta/form.props.default.json +0 -1
  24. package/es/lowcode/engine/meta/form.props.json +4 -5
  25. package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
  26. package/es/lowcode/engine/meta/iframe.props.json +1 -1
  27. package/es/lowcode/engine/meta/image.props.default.json +1 -1
  28. package/es/lowcode/engine/meta/image.props.json +1 -1
  29. package/es/lowcode/engine/meta/imex.props.default.json +2 -1
  30. package/es/lowcode/engine/meta/imex.props.json +26 -5
  31. package/es/lowcode/engine/meta/js-editor/auto-complete.json +38 -20
  32. package/es/lowcode/engine/meta/jsx.props.default.json +1 -1
  33. package/es/lowcode/engine/meta/jsx.props.json +1 -1
  34. package/es/lowcode/engine/meta/layout.props.default.json +1 -1
  35. package/es/lowcode/engine/meta/layout.props.json +5 -5
  36. package/es/lowcode/engine/meta/link.props.default.json +1 -1
  37. package/es/lowcode/engine/meta/link.props.json +1 -1
  38. package/es/lowcode/engine/meta/page.props.json +6 -0
  39. package/es/lowcode/engine/meta/pagelayout.props.default.json +1 -1
  40. package/es/lowcode/engine/meta/pagelayout.props.json +1 -1
  41. package/es/lowcode/engine/meta/section.props.json +2 -1
  42. package/es/lowcode/engine/meta/split.props.default.json +1 -1
  43. package/es/lowcode/engine/meta/split.props.json +1 -1
  44. package/es/lowcode/engine/meta/table.props.json +2 -2
  45. package/es/lowcode/engine/meta/text.props.default.json +4 -2
  46. package/es/lowcode/engine/meta/text.props.json +8 -6
  47. package/es/lowcode/engine/provider/ContextProvider/index.js +63 -46
  48. package/es/lowcode/engine/provider/ContextProvider/router.js +43 -0
  49. package/es/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
  50. package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -15
  51. package/es/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
  52. package/es/lowcode/engine/provider/ContextProvider/utils.js +157 -0
  53. package/es/lowcode/engine/provider/RemoteSourceProvider.js +1 -2
  54. package/es/lowcode/engine/tools/helper.js +7 -2
  55. package/es/lowcode/engine/tools/initDS.js +263 -0
  56. package/es/lowcode/engine/tools/useCombinedRefs.js +3 -2
  57. package/es/lowcode/painter/DesignOperator.js +10 -1
  58. package/es/lowcode/painter/Panel.js +2 -2
  59. package/es/lowcode/painter/components/AdvancePanel.js +3 -3
  60. package/es/lowcode/painter/components/Collapse.js +5 -2
  61. package/es/lowcode/painter/components/TipIcon.js +16 -0
  62. package/es/lowcode/painter/components/VarEditor.js +456 -0
  63. package/es/lowcode/painter/components/code-editor/FullScreenEditor.js +2 -2
  64. package/es/lowcode/painter/components/code-editor/JSEditor.js +3 -1
  65. package/es/lowcode/painter/components/code-editor/VisionEditor.js +81 -0
  66. package/es/lowcode/painter/components/field-setting/SettingUI.js +17 -3
  67. package/es/lowcode/painter/components/field-setting/index.js +1 -1
  68. package/es/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
  69. package/es/lowcode/painter/index.js +1 -0
  70. package/es/lowcode/painter/panel-section/BlockEditor/index.js +20 -6
  71. package/es/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
  72. package/es/lowcode/painter/panel-section/ComplexPop.js +242 -0
  73. package/es/lowcode/painter/panel-section/DataSetSelector.js +8 -0
  74. package/es/lowcode/painter/panel-section/FieldsSetting.js +29 -3
  75. package/es/lowcode/painter/panel-section/I18nInput.js +4 -2
  76. package/es/lowcode/painter/panel-section/Icon.js +9 -4
  77. package/es/lowcode/painter/panel-section/IconConditionSelector.js +7 -7
  78. package/es/lowcode/painter/panel-section/IconSelector.js +1 -1
  79. package/es/lowcode/painter/panel-section/ImpExp.js +1 -27
  80. package/es/lowcode/painter/panel-section/ImpExpAlone.js +1 -2
  81. package/es/lowcode/painter/panel-section/LayoutRatio.js +1 -0
  82. package/es/lowcode/painter/panel-section/PageVars.js +300 -0
  83. package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +4 -3
  84. package/es/lowcode/painter/panel-section/TabItems.js +6 -42
  85. package/es/lowcode/painter/panel-section/TextContent.js +79 -0
  86. package/es/lowcode/painter/services/complexPop.js +21 -0
  87. package/es/lowcode/painter/style/design.less +1 -1
  88. package/es/lowcode/painter/style/page-vars.less +25 -0
  89. package/es/lowcode/preview/index.js +1 -0
  90. package/es/lowcode/view/Canvas.js +24 -22
  91. package/es/lowcode/view/Loading.js +5 -7
  92. package/es/lowcode/view/Page.js +37 -15
  93. package/es/lowcode/view/index.js +1 -0
  94. package/es/lowcode/view/lc-components/Box/index.js +18 -3
  95. package/es/lowcode/view/lc-components/Box/meta.json +3 -3
  96. package/es/lowcode/view/lc-components/Button/index.js +7 -7
  97. package/es/lowcode/view/lc-components/Button/meta.json +2 -2
  98. package/es/lowcode/view/lc-components/Dialog/index.js +6 -7
  99. package/es/lowcode/view/lc-components/Dialog/meta.json +2 -2
  100. package/es/lowcode/view/lc-components/FieldComplex/meta.json +7 -0
  101. package/es/lowcode/view/lc-components/FieldDate/meta.json +4 -2
  102. package/es/lowcode/view/lc-components/FieldNumber/meta.json +3 -2
  103. package/es/lowcode/view/lc-components/FieldUser/meta.json +1 -1
  104. package/es/lowcode/view/lc-components/Form/index.js +14 -6
  105. package/es/lowcode/view/lc-components/Form/meta.json +4 -5
  106. package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
  107. package/es/lowcode/view/lc-components/ImEx/index.js +174 -103
  108. package/es/lowcode/view/lc-components/ImEx/meta.json +26 -5
  109. package/es/lowcode/view/lc-components/Image/meta.json +1 -1
  110. package/es/lowcode/view/lc-components/JSX/meta.json +1 -1
  111. package/es/lowcode/view/lc-components/Layout/index.js +22 -5
  112. package/es/lowcode/view/lc-components/Layout/meta.json +5 -5
  113. package/es/lowcode/view/lc-components/Link/meta.json +1 -1
  114. package/es/lowcode/view/lc-components/Page/meta.json +6 -0
  115. package/es/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
  116. package/es/lowcode/view/lc-components/PageLayout/meta.json +1 -1
  117. package/es/lowcode/view/lc-components/Section/index.js +2 -6
  118. package/es/lowcode/view/lc-components/Section/meta.json +2 -1
  119. package/es/lowcode/view/lc-components/Split/index.js +19 -4
  120. package/es/lowcode/view/lc-components/Split/meta.json +1 -1
  121. package/es/lowcode/view/lc-components/Table/index.js +29 -3
  122. package/es/lowcode/view/lc-components/Table/meta.json +2 -2
  123. package/es/lowcode/view/lc-components/Tabs/index.js +19 -16
  124. package/es/lowcode/view/lc-components/Text/index.js +9 -2
  125. package/es/lowcode/view/lc-components/Text/meta.json +6 -6
  126. package/es/lowcode/view/lc-components/Wrapper.js +17 -2
  127. package/es/lowcode/view/style/loading.less +14 -0
  128. package/es/services.js +19 -0
  129. package/es/upload/Form/gridForm.js +17 -7
  130. package/es/upload/FormItem/index.js +6 -6
  131. package/es/utils/form.js +4 -4
  132. package/es/utils/grid.js +2 -1
  133. package/lib/components/Builder/index.js +13 -1
  134. package/lib/components/ComplexItem/index.js +62 -47
  135. package/lib/components/LdAutoForm/index.js +3 -2
  136. package/lib/components/LdFormList/index.js +5 -8
  137. package/lib/components/LdGridForm/index.js +2 -1
  138. package/lib/helper/form.js +1 -0
  139. package/lib/helper/ldBuilder.js +8 -3
  140. package/lib/locales/zh-CN.js +38 -4
  141. package/lib/lowcode/constants/event-topics.js +1 -3
  142. package/lib/lowcode/engine/launcher.js +3 -1
  143. package/lib/lowcode/engine/meta/box.props.json +3 -3
  144. package/lib/lowcode/engine/meta/button.props.default.json +1 -1
  145. package/lib/lowcode/engine/meta/button.props.json +2 -2
  146. package/lib/lowcode/engine/meta/dialog.props.json +2 -2
  147. package/lib/lowcode/engine/meta/fieldcomplex.props.default.json +1 -0
  148. package/lib/lowcode/engine/meta/fieldcomplex.props.json +7 -0
  149. package/lib/lowcode/engine/meta/fielddate.props.default.json +2 -0
  150. package/lib/lowcode/engine/meta/fielddate.props.json +4 -2
  151. package/lib/lowcode/engine/meta/fieldnumber.props.default.json +1 -0
  152. package/lib/lowcode/engine/meta/fieldnumber.props.json +3 -2
  153. package/lib/lowcode/engine/meta/fielduser.props.default.json +1 -1
  154. package/lib/lowcode/engine/meta/fielduser.props.json +1 -1
  155. package/lib/lowcode/engine/meta/form.props.default.json +0 -1
  156. package/lib/lowcode/engine/meta/form.props.json +4 -5
  157. package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
  158. package/lib/lowcode/engine/meta/iframe.props.json +1 -1
  159. package/lib/lowcode/engine/meta/image.props.default.json +1 -1
  160. package/lib/lowcode/engine/meta/image.props.json +1 -1
  161. package/lib/lowcode/engine/meta/imex.props.default.json +2 -1
  162. package/lib/lowcode/engine/meta/imex.props.json +26 -5
  163. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +38 -20
  164. package/lib/lowcode/engine/meta/jsx.props.default.json +1 -1
  165. package/lib/lowcode/engine/meta/jsx.props.json +1 -1
  166. package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
  167. package/lib/lowcode/engine/meta/layout.props.json +5 -5
  168. package/lib/lowcode/engine/meta/link.props.default.json +1 -1
  169. package/lib/lowcode/engine/meta/link.props.json +1 -1
  170. package/lib/lowcode/engine/meta/page.props.json +6 -0
  171. package/lib/lowcode/engine/meta/pagelayout.props.default.json +1 -1
  172. package/lib/lowcode/engine/meta/pagelayout.props.json +1 -1
  173. package/lib/lowcode/engine/meta/section.props.json +2 -1
  174. package/lib/lowcode/engine/meta/split.props.default.json +1 -1
  175. package/lib/lowcode/engine/meta/split.props.json +1 -1
  176. package/lib/lowcode/engine/meta/table.props.json +2 -2
  177. package/lib/lowcode/engine/meta/text.props.default.json +4 -2
  178. package/lib/lowcode/engine/meta/text.props.json +8 -6
  179. package/lib/lowcode/engine/provider/ContextProvider/index.js +61 -44
  180. package/lib/lowcode/engine/provider/ContextProvider/router.js +57 -0
  181. package/lib/lowcode/engine/{tools → provider/ContextProvider}/usePageDataStore.js +9 -7
  182. package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +38 -16
  183. package/lib/lowcode/engine/{tools → provider/ContextProvider}/useTodo.js +5 -7
  184. package/lib/lowcode/engine/provider/ContextProvider/utils.js +170 -0
  185. package/lib/lowcode/engine/provider/RemoteSourceProvider.js +2 -3
  186. package/lib/lowcode/engine/tools/helper.js +7 -2
  187. package/lib/lowcode/engine/tools/initDS.js +270 -0
  188. package/lib/lowcode/engine/tools/useCombinedRefs.js +2 -1
  189. package/lib/lowcode/painter/DesignOperator.js +9 -0
  190. package/lib/lowcode/painter/Panel.js +2 -2
  191. package/lib/lowcode/painter/components/AdvancePanel.js +3 -3
  192. package/lib/lowcode/painter/components/Collapse.js +5 -2
  193. package/lib/lowcode/painter/components/TipIcon.js +23 -0
  194. package/lib/lowcode/painter/components/VarEditor.js +463 -0
  195. package/lib/lowcode/painter/components/code-editor/FullScreenEditor.js +2 -2
  196. package/lib/lowcode/painter/components/code-editor/JSEditor.js +3 -1
  197. package/lib/lowcode/painter/components/code-editor/VisionEditor.js +88 -0
  198. package/lib/lowcode/painter/components/field-setting/SettingUI.js +17 -3
  199. package/lib/lowcode/painter/components/field-setting/index.js +1 -1
  200. package/lib/lowcode/painter/components/field-setting/meta/frontRules.js +2 -1
  201. package/lib/lowcode/painter/index.js +1 -0
  202. package/lib/lowcode/painter/panel-section/BlockEditor/index.js +19 -5
  203. package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +2 -2
  204. package/lib/lowcode/painter/panel-section/ComplexPop.js +250 -0
  205. package/lib/lowcode/painter/panel-section/DataSetSelector.js +8 -0
  206. package/lib/lowcode/painter/panel-section/FieldsSetting.js +29 -3
  207. package/lib/lowcode/painter/panel-section/I18nInput.js +4 -2
  208. package/lib/lowcode/painter/panel-section/Icon.js +8 -3
  209. package/lib/lowcode/painter/panel-section/IconConditionSelector.js +6 -6
  210. package/lib/lowcode/painter/panel-section/IconSelector.js +1 -1
  211. package/lib/lowcode/painter/panel-section/ImpExp.js +0 -26
  212. package/lib/lowcode/painter/panel-section/ImpExpAlone.js +0 -1
  213. package/lib/lowcode/painter/panel-section/LayoutRatio.js +1 -0
  214. package/lib/lowcode/painter/panel-section/PageVars.js +308 -0
  215. package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +4 -3
  216. package/lib/lowcode/painter/panel-section/TabItems.js +6 -42
  217. package/lib/lowcode/painter/panel-section/TextContent.js +87 -0
  218. package/lib/lowcode/painter/services/complexPop.js +28 -0
  219. package/lib/lowcode/painter/style/design.less +1 -1
  220. package/lib/lowcode/painter/style/page-vars.less +25 -0
  221. package/lib/lowcode/preview/index.js +1 -0
  222. package/lib/lowcode/view/Canvas.js +24 -22
  223. package/lib/lowcode/view/Loading.js +5 -7
  224. package/lib/lowcode/view/Page.js +35 -13
  225. package/lib/lowcode/view/index.js +1 -0
  226. package/lib/lowcode/view/lc-components/Box/index.js +17 -2
  227. package/lib/lowcode/view/lc-components/Box/meta.json +3 -3
  228. package/lib/lowcode/view/lc-components/Button/index.js +5 -5
  229. package/lib/lowcode/view/lc-components/Button/meta.json +2 -2
  230. package/lib/lowcode/view/lc-components/Dialog/index.js +6 -7
  231. package/lib/lowcode/view/lc-components/Dialog/meta.json +2 -2
  232. package/lib/lowcode/view/lc-components/FieldComplex/meta.json +7 -0
  233. package/lib/lowcode/view/lc-components/FieldDate/meta.json +4 -2
  234. package/lib/lowcode/view/lc-components/FieldNumber/meta.json +3 -2
  235. package/lib/lowcode/view/lc-components/FieldUser/meta.json +1 -1
  236. package/lib/lowcode/view/lc-components/Form/index.js +14 -6
  237. package/lib/lowcode/view/lc-components/Form/meta.json +4 -5
  238. package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
  239. package/lib/lowcode/view/lc-components/ImEx/index.js +172 -101
  240. package/lib/lowcode/view/lc-components/ImEx/meta.json +26 -5
  241. package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
  242. package/lib/lowcode/view/lc-components/JSX/meta.json +1 -1
  243. package/lib/lowcode/view/lc-components/Layout/index.js +21 -4
  244. package/lib/lowcode/view/lc-components/Layout/meta.json +5 -5
  245. package/lib/lowcode/view/lc-components/Link/meta.json +1 -1
  246. package/lib/lowcode/view/lc-components/Page/meta.json +6 -0
  247. package/lib/lowcode/view/lc-components/PageLayout/FunctionDesign.js +5 -1
  248. package/lib/lowcode/view/lc-components/PageLayout/meta.json +1 -1
  249. package/lib/lowcode/view/lc-components/Section/index.js +2 -6
  250. package/lib/lowcode/view/lc-components/Section/meta.json +2 -1
  251. package/lib/lowcode/view/lc-components/Split/index.js +18 -3
  252. package/lib/lowcode/view/lc-components/Split/meta.json +1 -1
  253. package/lib/lowcode/view/lc-components/Table/index.js +30 -4
  254. package/lib/lowcode/view/lc-components/Table/meta.json +2 -2
  255. package/lib/lowcode/view/lc-components/Tabs/index.js +17 -14
  256. package/lib/lowcode/view/lc-components/Text/index.js +8 -1
  257. package/lib/lowcode/view/lc-components/Text/meta.json +6 -6
  258. package/lib/lowcode/view/lc-components/Wrapper.js +16 -1
  259. package/lib/lowcode/view/style/loading.less +14 -0
  260. package/lib/services.js +20 -0
  261. package/lib/upload/Form/gridForm.js +17 -7
  262. package/lib/upload/FormItem/index.js +6 -6
  263. package/lib/utils/form.js +3 -3
  264. package/lib/utils/grid.js +2 -1
  265. package/package.json +3 -3
@@ -6,6 +6,6 @@
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
8
  "order": 1,
9
- "css": {},
9
+ "css": "",
10
10
  "supportFullScreen": true
11
11
  }
@@ -27,6 +27,6 @@
27
27
  "default": true
28
28
  }
29
29
  ],
30
- "css": {},
30
+ "css": "",
31
31
  "advance": {}
32
32
  }
@@ -6,7 +6,7 @@
6
6
  "groupName": "基础",
7
7
  "desc": "用于显示图像或照片。以便用户可以轻松地创建具有自定义图片样式和布局的界面。",
8
8
  "order": 1,
9
- "css": {},
9
+ "css": "",
10
10
  "width": 350,
11
11
  "height": 200,
12
12
  "autoWidth": false,
@@ -88,7 +88,7 @@
88
88
  "default": false
89
89
  }
90
90
  ],
91
- "css": {},
91
+ "css": "",
92
92
  "advance": {
93
93
  "events": [
94
94
  {
@@ -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": "(params)=>{\n\t\n}"
113
+ "func": "function onMount() {\n\t\n}"
93
114
  },
94
115
  {
95
116
  "key": "onUnmount",
96
117
  "name": "组件卸载时",
97
118
  "desc": "在组件卸载时,执行方法。",
98
- "func": "(params)=>{\n\t\n}"
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": "(params)=>{\n\t\n}"
125
+ "func": "function beforeExe() {\n\t\n}"
105
126
  },
106
127
  {
107
128
  "key": "afterExe",
108
129
  "name": "操作执行后",
109
130
  "desc": "在导入或导出执行后,执行方法",
110
- "func": "(params)=>{\n\t\n}"
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": "getParentElement",
234
+ "label": "getParentElementById",
229
235
  "kind": "method",
230
- "insertText": "getParentElement(compId)",
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
  }
@@ -6,6 +6,6 @@
6
6
  "group": "basic",
7
7
  "groupName": "基础",
8
8
  "order": 1,
9
- "css": "width: 100%; height: auto;",
9
+ "css": "",
10
10
  "render": "function Component() {\n\treturn(\n\t\t<div>\n\t\t\t此为自定义代码组件,请使用 JSX 语法\n\t\t</div>\n\t)\n}"
11
11
  }
@@ -26,5 +26,5 @@
26
26
  }
27
27
  }
28
28
  ],
29
- "css": "width: 100%; height: auto;"
29
+ "css": ""
30
30
  }
@@ -6,7 +6,7 @@
6
6
  "groupName": "布局",
7
7
  "desc": "布局容器是一种提供列比例、列间距、行间距和样式等配置选项的元素,用于创建灵活的页面布局。它使用户能够轻松组织和排列组件,并实现各种复杂的布局需求。",
8
8
  "order": 1,
9
- "css": {},
9
+ "css": "background-color: transparent;",
10
10
  "columnRatio": "12:3:9",
11
11
  "columnSpacing": 16,
12
12
  "lineSpacing": 16,
@@ -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(params) {\n\t\n}"
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(params) {\n\t\n}"
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": {},
9
+ "css": "",
10
10
  "textOverflow": false,
11
11
  "type": "page",
12
12
  "isLayer": false,
@@ -86,7 +86,7 @@
86
86
  "default": "hidden"
87
87
  }
88
88
  ],
89
- "css": {},
89
+ "css": "",
90
90
  "advance": {
91
91
  "events": [
92
92
  {
@@ -27,6 +27,12 @@
27
27
  "default": "false"
28
28
  }
29
29
  ]
30
+ },
31
+ {
32
+ "key": "vars",
33
+ "name": "页面数据源",
34
+ "type": "_PageVars",
35
+ "wrapper": "collapse"
30
36
  }
31
37
  ],
32
38
  "css": "background-color: transparent;",
@@ -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",
@@ -39,7 +39,7 @@
39
39
  ]
40
40
  }
41
41
  ],
42
- "css": "width: 100%; height: 100%; background-color: transparent",
42
+ "css": "width: 100%; height: 100%; background-color: transparent;",
43
43
  "advance": {
44
44
  "events": [
45
45
  {
@@ -64,7 +64,8 @@
64
64
  {
65
65
  "key": "tooltip",
66
66
  "name": "用户提示",
67
- "type": "_I18nInput"
67
+ "type": "_I18nInput",
68
+ "wrapped": "textarea"
68
69
  },
69
70
  {
70
71
  "key": "subtitle",
@@ -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
  "display": {
11
11
  "type": "normal",
12
12
  "split": "horizontal",
@@ -31,7 +31,7 @@
31
31
  ]
32
32
  }
33
33
  ],
34
- "css": "width: 100%, height: 100%, background-color: transparent",
34
+ "css": "width: 100%; height: 100%; background-color: transparent;",
35
35
  "advance": {
36
36
  "events": [
37
37
  {
@@ -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",
@@ -6,8 +6,10 @@
6
6
  "groupName": "基础",
7
7
  "desc": "文本组件用于显示文本内容。",
8
8
  "order": 1,
9
- "css": {},
10
- "content": "文本",
9
+ "css": "",
10
+ "content": {
11
+ "text": "文本内容"
12
+ },
11
13
  "maxLine": 0,
12
14
  "advance": {
13
15
  "events": {}
@@ -15,22 +15,24 @@
15
15
  },
16
16
  {
17
17
  "key": "content",
18
- "name": "内容",
19
- "desc": "文本内容设置",
20
- "type": "_I18nInput",
21
- "default": "文本",
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
  {
@@ -1,16 +1,18 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React, { createContext, useContext as useReactContext, useRef } from 'react';
4
- import { history } from 'umi';
5
- import { useMemoizedFn, useUpdateEffect } from 'ahooks';
4
+ import { useMemoizedFn } from 'ahooks';
6
5
  import { isNil } from 'lodash';
7
- import diff from "../../tools/diff";
8
6
  import { useLDEventBus } from "../EventBusProvider";
9
7
  import RemoteSourceProvider, { RemoteSourceContext } from "../RemoteSourceProvider";
10
8
  import usePageVar from "./usePageVar";
11
- import useTodo from "../../tools/useTodo";
12
- import { getModuleData } from "../../tools/usePageDataStore";
9
+ import useTodo from "./useTodo";
10
+ import { getModuleData } from "./usePageDataStore";
11
+ import API_PREFIX from "@/services/ApiConfig";
12
+ import { getBehaviorUrl } from "../../../constants/api-url";
13
13
  import * as topics from "../../../constants/event-topics";
14
+ import * as utils from "./utils";
15
+ import * as router from "./router";
14
16
  export var Context = /*#__PURE__*/createContext(null);
15
17
  export var useContext = function useContext() {
16
18
  return useReactContext(Context);
@@ -18,31 +20,32 @@ export var useContext = function useContext() {
18
20
  export var useRemoteSource = function useRemoteSource() {
19
21
  return useReactContext(RemoteSourceContext);
20
22
  };
21
- export * from "../../tools/usePageDataStore";
22
- var PRIVATE_KEYS = ['componentList', 'componentMap'];
23
+ export * from "./usePageDataStore";
24
+ var PRIVATE_KEYS = ['componentList', 'componentMap', 'remoteApiMap'];
23
25
  export default (function (_ref) {
24
26
  var children = _ref.children,
25
27
  code = _ref.code;
26
28
  var eventBus = useLDEventBus();
27
29
  var _useTodo = useTodo(),
28
- _useTodo2 = _slicedToArray(_useTodo, 3),
30
+ _useTodo2 = _slicedToArray(_useTodo, 2),
29
31
  todo = _useTodo2[0],
30
- callBehavior = _useTodo2[1],
31
- loading = _useTodo2[2];
32
- var _usePageVar = usePageVar(null, null),
33
- state = _usePageVar.state,
34
- prevState = _usePageVar.prevState,
32
+ loading = _useTodo2[1];
33
+ var _usePageVar = usePageVar(),
35
34
  setState = _usePageVar.setState,
36
35
  getState = _usePageVar.getState,
37
36
  global = _usePageVar.global,
38
37
  setGlobal = _usePageVar.setGlobal;
39
38
  var _componentList = useRef([]);
39
+ var _remoteApiMap = useRef(new Map());
40
40
  var _privateGetter = useRef({
41
41
  componentList: function componentList() {
42
42
  return _componentList.current;
43
43
  },
44
44
  componentMap: function componentMap() {
45
45
  return new Map(_componentList.current);
46
+ },
47
+ remoteApiMap: function remoteApiMap() {
48
+ return Object.fromEntries(_remoteApiMap.current.entries());
46
49
  }
47
50
  });
48
51
  var _register = useMemoizedFn(function (id, component) {
@@ -55,6 +58,9 @@ export default (function (_ref) {
55
58
  return _id !== id;
56
59
  });
57
60
  });
61
+ var _initRemoteApiMap = useMemoizedFn(function (_apiMap) {
62
+ _remoteApiMap.current = _apiMap;
63
+ });
58
64
  var getElementById = useMemoizedFn(function (compId) {
59
65
  var _componentList$curren;
60
66
  return (_componentList$curren = _componentList.current.find(function (_ref4) {
@@ -63,15 +69,13 @@ export default (function (_ref) {
63
69
  return compId === _id;
64
70
  })) === null || _componentList$curren === void 0 ? void 0 : _componentList$curren[1];
65
71
  });
66
- var getParentElement = useMemoizedFn(function (compId) {
72
+ var getParentElementById = useMemoizedFn(function (compId) {
73
+ var _target$api$getSelfDa;
67
74
  var compMap = new Map(_componentList.current);
68
75
  var _target = compMap.get(compId);
69
- var _parentId = _target.api.getSelfData().parentId;
76
+ var _parentId = (_target$api$getSelfDa = _target.api.getSelfData()) === null || _target$api$getSelfDa === void 0 ? void 0 : _target$api$getSelfDa.props.parentId;
70
77
  if (!_parentId) return null;
71
- return compMap(_parentId);
72
- });
73
- var getUrlParams = useMemoizedFn(function () {
74
- return history.location.query;
78
+ return compMap.get(_parentId);
75
79
  });
76
80
  var want = useMemoizedFn(function (wanted) {
77
81
  var _getModuleData;
@@ -89,53 +93,42 @@ export default (function (_ref) {
89
93
  }, 0);
90
94
  return (serialsValue & (serialMap[wanted] || 0)) === 1;
91
95
  });
92
- useUpdateEffect(function () {
93
- var _diff = diff(prevState, state);
94
- eventBus.$publisher(topics.PAGE_STATE_CHANGED, {
95
- state: state,
96
- prevState: prevState,
97
- diff: _diff
98
- });
99
- }, [state, prevState]);
100
96
  var ctx = new Proxy(_objectSpread({
101
97
  _register: _register,
102
98
  _unregister: _unregister,
99
+ _initRemoteApiMap: _initRemoteApiMap,
103
100
  /**
104
101
  * @property {boolean} loading - loading状态
105
102
  */
106
103
  loading: loading,
107
- /**
108
- * @property {object} history - 当前路由信息
109
- */
110
- history: history,
111
- /**
112
- * @method - 执行行为接口
113
- * @param {object} evns - moduleCode: 模块编码,datasetCode:数据集编码,behaviorKey:行为key
114
- * @param {object} params - 链接参数
115
- * @param {object} data - body参数
116
- */
117
- callBehavior: callBehavior,
118
104
  /**
119
105
  * @property {object} topics - 内置的事件话题
120
106
  */
121
107
  topics: topics,
108
+ /**
109
+ * @property {object} topics - service api前缀
110
+ */
111
+ API_PREFIX: API_PREFIX,
122
112
  /**
123
113
  * @property {string} PRIMARY_KEY - 主键key
124
114
  */
125
115
  PRIMARY_KEY: window.appConfig.constraintKeys.PRIMARY,
116
+ /**
117
+ * @property {string} PARENT_KEY - 树组件主键key
118
+ */
126
119
  PARENT_KEY: window.appConfig.constraintKeys.PARENT,
127
120
  /**
128
121
  * @method - 根据组件ID获取实例
129
122
  * @param {string} compId - 组件ID
130
123
  * @return {object} target - 组件实例
131
124
  */
132
- getElementById: getElementById,
125
+ $: getElementById,
133
126
  /**
134
127
  * @method - 根据组件ID获取父组件实例
135
128
  * @param {string} compId - 组件ID
136
129
  * @return {object} target - 父组件实例
137
130
  */
138
- getParentElement: getParentElement,
131
+ $$: getParentElementById,
139
132
  /**
140
133
  * @method - 执行行为池
141
134
  * @param {object} actionPool - 行为池
@@ -144,16 +137,38 @@ export default (function (_ref) {
144
137
  doAction: function doAction(actionPool, args) {
145
138
  return todo(this, actionPool, args);
146
139
  },
147
- /**
148
- * @method - 获取URL参数
149
- * @return {object} params - url参数
150
- */
151
- getUrlParams: getUrlParams,
152
140
  /**
153
141
  * @method - 是否有权限
154
142
  * @return {string} wanted - 期望的资源串
155
143
  */
156
- want: want
144
+ want: want,
145
+ /**
146
+ * @method - 获取执行行为请求的接口URL
147
+ * @return {string} BEHAVIOR_URL - 执行行为请求的接口URL
148
+ */
149
+ getBehaviorUrl: getBehaviorUrl,
150
+ /**
151
+ * @typedef {Object} Utils
152
+ * @property {function(type, props): void} dialog - 弹出对话框
153
+ * @property {function({ moduleCode, datasetCode, behaviorKey }, params, data): Promise} callBehavior - 执行行为
154
+ * @property {function(type, value, formatOrSeparator): string} formatter - 常用的 formatter 函数用于进行事件、金额、手机号等 format
155
+ * @property {function(when, type): string} getDateTimeRange - 获取当前或指定日期的开始结束区间时间戳
156
+ */
157
+ /**
158
+ * @property {Utils} 工具类
159
+ */
160
+ utils: utils,
161
+ /**
162
+ * @typedef {Object} Router
163
+ * @property {function(path, params): void} push - 跳转
164
+ * @property {function(path, state): void} replace - 替换
165
+ * @property {function{}: object} getQuery - 获取URL参数
166
+ * @property {function(params): string} stringifyQuery - 序列化 URL 参数
167
+ */
168
+ /**
169
+ * @property {Router} router - 路由
170
+ */
171
+ router: router
157
172
  }, eventBus), {
158
173
  get: function get(target, property, receiver) {
159
174
  if (PRIVATE_KEYS.includes(property)) {
@@ -169,6 +184,8 @@ export default (function (_ref) {
169
184
  set: function set(target, property, receiver) {
170
185
  if (PRIVATE_KEYS.includes(property)) {
171
186
  throw new Error("\u5C5E\u6027 \"".concat(property, "\" \u662F\u53EA\u8BFB\u7684"));
187
+ } else if (property.startsWith('_')) {
188
+ throw new Error("\u5C5E\u6027 \"".concat(property, "\" \u662F\u79C1\u6709\u7684"));
172
189
  } else if (property === 'state') {
173
190
  setState(receiver);
174
191
  return true;