@luck-design-biz/luckda 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/es/components/LDActions/index.less +3 -1
  2. package/es/components/LdAutoForm/index.js +2 -1
  3. package/es/components/LdCard/index.js +154 -67
  4. package/es/components/LdFormList/index.js +20 -6
  5. package/es/components/LdGridForm/index.js +40 -24
  6. package/es/components/LdTree/index.js +14 -8
  7. package/es/components/LdTree/index.less +4 -2
  8. package/es/helper/ldBuilder.js +1 -1
  9. package/es/locales/zh-CN.js +13 -4
  10. package/es/lowcode/constants/index.js +1 -1
  11. package/es/lowcode/engine/meta/cardlist.props.default.json +27 -6
  12. package/es/lowcode/engine/meta/cardlist.props.json +254 -72
  13. package/es/lowcode/engine/meta/components-list.json +6 -102
  14. package/es/lowcode/engine/meta/dialog.props.default.json +4 -2
  15. package/es/lowcode/engine/meta/dialog.props.json +74 -18
  16. package/es/lowcode/engine/meta/drawer.props.default.json +15 -4
  17. package/es/lowcode/engine/meta/drawer.props.json +144 -24
  18. package/es/lowcode/engine/meta/form.props.default.json +14 -3
  19. package/es/lowcode/engine/meta/form.props.json +49 -9
  20. package/es/lowcode/engine/meta/grouptree.props.default.json +16 -0
  21. package/es/lowcode/engine/meta/grouptree.props.json +83 -0
  22. package/es/lowcode/engine/meta/iframe.props.default.json +1 -1
  23. package/es/lowcode/engine/meta/iframe.props.json +3 -4
  24. package/es/lowcode/engine/meta/image.props.default.json +3 -2
  25. package/es/lowcode/engine/meta/image.props.json +51 -16
  26. package/es/lowcode/engine/meta/imex.props.json +1 -1
  27. package/es/lowcode/engine/meta/js-editor/auto-complete.json +23 -5
  28. package/es/lowcode/engine/meta/link.props.default.json +1 -1
  29. package/es/lowcode/engine/meta/link.props.json +9 -9
  30. package/es/lowcode/engine/meta/table.props.json +1 -1
  31. package/es/lowcode/engine/meta/tabs.props.default.json +1 -1
  32. package/es/lowcode/engine/meta/tabs.props.json +1 -1
  33. package/es/lowcode/engine/meta/tree.props.json +2 -2
  34. package/es/lowcode/engine/provider/ContextProvider/index.js +6 -2
  35. package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +82 -2
  36. package/es/lowcode/engine/tools/helper.js +21 -0
  37. package/es/lowcode/engine/tools/useCanvasRender.js +13 -1
  38. package/es/lowcode/painter/Components.js +6 -1
  39. package/es/lowcode/painter/Design.js +1 -0
  40. package/es/lowcode/painter/DesignOperator.js +25 -15
  41. package/es/lowcode/painter/DesignToolbar.js +78 -47
  42. package/es/lowcode/painter/Ribbon.js +14 -1
  43. package/es/lowcode/painter/components/ActionBindModal.js +3 -7
  44. package/es/lowcode/painter/components/DragDrop/DragDropContext.js +144 -37
  45. package/es/lowcode/painter/components/DragDrop/DragDropWrapper.js +29 -6
  46. package/es/lowcode/painter/components/DragDrop/Overlay.js +5 -2
  47. package/es/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
  48. package/es/lowcode/painter/components/NumberInput.js +1 -1
  49. package/es/lowcode/painter/components/code-editor/BaseEditor.js +2 -1
  50. package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
  51. package/es/lowcode/painter/components/field-setting/SettingUI.js +30 -2
  52. package/es/lowcode/painter/components/field-setting/index.js +26 -12
  53. package/es/lowcode/painter/expect.js +27 -0
  54. package/es/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +20 -2
  55. package/es/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
  56. package/es/lowcode/painter/panel-section/ComplexPop.js +1 -1
  57. package/es/lowcode/painter/panel-section/DataSetSelector.js +14 -3
  58. package/es/lowcode/painter/panel-section/FieldsSetting.js +2 -2
  59. package/es/lowcode/painter/panel-section/GroupClassSelector.js +55 -0
  60. package/es/lowcode/painter/panel-section/PageVars.js +1 -1
  61. package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +1 -0
  62. package/es/lowcode/painter/panel-section/TabItems.js +1 -1
  63. package/es/lowcode/painter/panel-section/TableTopFilter.js +3 -3
  64. package/es/lowcode/painter/style/action-bind-modal.less +5 -3
  65. package/es/lowcode/painter/style/design.less +26 -7
  66. package/es/lowcode/painter/style/dragdrop.less +46 -0
  67. package/es/lowcode/painter/style/list-editor.less +5 -3
  68. package/es/lowcode/painter/style/number-input.less +3 -1
  69. package/es/lowcode/painter/style/outline.less +3 -1
  70. package/es/lowcode/painter/style/panel-attrs.less +7 -3
  71. package/es/lowcode/painter/style/panel.less +9 -7
  72. package/es/lowcode/painter/style/radio.less +1 -1
  73. package/es/lowcode/painter/style/ribbon.less +4 -2
  74. package/es/lowcode/painter/svg/code.svg +3 -0
  75. package/es/lowcode/painter/svg/expect.svg +9 -0
  76. package/es/lowcode/view/lc-components/CardList/index.js +481 -12
  77. package/es/lowcode/view/lc-components/CardList/meta.json +255 -73
  78. package/es/lowcode/view/lc-components/Dialog/FunctionDesign.js +14 -6
  79. package/es/lowcode/view/lc-components/Dialog/index.js +15 -5
  80. package/es/lowcode/view/lc-components/Dialog/index.less +4 -0
  81. package/es/lowcode/view/lc-components/Dialog/meta.json +72 -18
  82. package/es/lowcode/view/lc-components/Drawer/FunctionDesign.js +51 -8
  83. package/es/lowcode/view/lc-components/Drawer/index.js +139 -24
  84. package/es/lowcode/view/lc-components/Drawer/index.less +11 -8
  85. package/es/lowcode/view/lc-components/Drawer/meta.json +136 -25
  86. package/es/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
  87. package/es/lowcode/view/lc-components/Form/index.js +45 -28
  88. package/es/lowcode/view/lc-components/Form/meta.json +44 -8
  89. package/es/lowcode/view/lc-components/GroupTree/FunctionDesign.js +10 -0
  90. package/es/lowcode/view/lc-components/GroupTree/FunctionLive.js +10 -0
  91. package/es/lowcode/view/lc-components/GroupTree/FunctionPreview.js +10 -0
  92. package/es/lowcode/view/lc-components/GroupTree/index.js +212 -0
  93. package/es/lowcode/view/lc-components/GroupTree/index.less +12 -0
  94. package/es/lowcode/view/lc-components/GroupTree/meta.json +83 -0
  95. package/es/lowcode/view/lc-components/Iframe/index.js +57 -7
  96. package/es/lowcode/view/lc-components/Iframe/meta.json +3 -4
  97. package/es/lowcode/view/lc-components/ImEx/meta.json +1 -1
  98. package/es/lowcode/view/lc-components/Image/index.js +82 -6
  99. package/es/lowcode/view/lc-components/Image/index.less +27 -0
  100. package/es/lowcode/view/lc-components/Image/meta.json +51 -16
  101. package/es/lowcode/view/lc-components/Link/index.js +53 -5
  102. package/es/lowcode/view/lc-components/Link/index.less +15 -0
  103. package/es/lowcode/view/lc-components/Link/meta.json +9 -9
  104. package/es/lowcode/view/lc-components/Table/index.js +5 -6
  105. package/es/lowcode/view/lc-components/Table/meta.json +1 -1
  106. package/es/lowcode/view/lc-components/Tabs/FunctionDesign.js +40 -4
  107. package/es/lowcode/view/lc-components/Tabs/index.js +1 -1
  108. package/es/lowcode/view/lc-components/Tabs/meta.json +1 -1
  109. package/es/lowcode/view/lc-components/Tree/index.js +21 -19
  110. package/es/lowcode/view/lc-components/Tree/meta.json +2 -2
  111. package/es/utils/grid.js +3 -3
  112. package/lib/components/LDActions/index.less +3 -1
  113. package/lib/components/LdAutoForm/index.js +2 -1
  114. package/lib/components/LdCard/index.js +153 -66
  115. package/lib/components/LdFormList/index.js +19 -5
  116. package/lib/components/LdGridForm/index.js +40 -24
  117. package/lib/components/LdTree/index.js +14 -8
  118. package/lib/components/LdTree/index.less +4 -2
  119. package/lib/helper/ldBuilder.js +2 -2
  120. package/lib/locales/zh-CN.js +13 -4
  121. package/lib/lowcode/constants/index.js +1 -1
  122. package/lib/lowcode/engine/meta/cardlist.props.default.json +27 -6
  123. package/lib/lowcode/engine/meta/cardlist.props.json +254 -72
  124. package/lib/lowcode/engine/meta/components-list.json +6 -102
  125. package/lib/lowcode/engine/meta/dialog.props.default.json +4 -2
  126. package/lib/lowcode/engine/meta/dialog.props.json +74 -18
  127. package/lib/lowcode/engine/meta/drawer.props.default.json +15 -4
  128. package/lib/lowcode/engine/meta/drawer.props.json +144 -24
  129. package/lib/lowcode/engine/meta/form.props.default.json +14 -3
  130. package/lib/lowcode/engine/meta/form.props.json +49 -9
  131. package/lib/lowcode/engine/meta/grouptree.props.default.json +16 -0
  132. package/lib/lowcode/engine/meta/grouptree.props.json +83 -0
  133. package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
  134. package/lib/lowcode/engine/meta/iframe.props.json +3 -4
  135. package/lib/lowcode/engine/meta/image.props.default.json +3 -2
  136. package/lib/lowcode/engine/meta/image.props.json +51 -16
  137. package/lib/lowcode/engine/meta/imex.props.json +1 -1
  138. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +23 -5
  139. package/lib/lowcode/engine/meta/link.props.default.json +1 -1
  140. package/lib/lowcode/engine/meta/link.props.json +9 -9
  141. package/lib/lowcode/engine/meta/table.props.json +1 -1
  142. package/lib/lowcode/engine/meta/tabs.props.default.json +1 -1
  143. package/lib/lowcode/engine/meta/tabs.props.json +1 -1
  144. package/lib/lowcode/engine/meta/tree.props.json +2 -2
  145. package/lib/lowcode/engine/provider/ContextProvider/index.js +6 -2
  146. package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +83 -3
  147. package/lib/lowcode/engine/tools/helper.js +22 -0
  148. package/lib/lowcode/engine/tools/useCanvasRender.js +13 -1
  149. package/lib/lowcode/painter/Components.js +6 -1
  150. package/lib/lowcode/painter/Design.js +1 -0
  151. package/lib/lowcode/painter/DesignOperator.js +25 -15
  152. package/lib/lowcode/painter/DesignToolbar.js +78 -47
  153. package/lib/lowcode/painter/Ribbon.js +14 -1
  154. package/lib/lowcode/painter/components/ActionBindModal.js +3 -7
  155. package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +142 -35
  156. package/lib/lowcode/painter/components/DragDrop/DragDropWrapper.js +27 -4
  157. package/lib/lowcode/painter/components/DragDrop/Overlay.js +5 -2
  158. package/lib/lowcode/painter/components/DragDrop/TreeDragDropWrapper.js +7 -4
  159. package/lib/lowcode/painter/components/NumberInput.js +1 -1
  160. package/lib/lowcode/painter/components/code-editor/BaseEditor.js +2 -1
  161. package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
  162. package/lib/lowcode/painter/components/field-setting/SettingUI.js +29 -1
  163. package/lib/lowcode/painter/components/field-setting/index.js +26 -12
  164. package/lib/lowcode/painter/expect.js +34 -0
  165. package/lib/lowcode/painter/panel-section/ActionsEditor/ActionEditor.js +19 -1
  166. package/lib/lowcode/painter/panel-section/ActionsEditor/index.js +18 -3
  167. package/lib/lowcode/painter/panel-section/ComplexPop.js +1 -1
  168. package/lib/lowcode/painter/panel-section/DataSetSelector.js +14 -3
  169. package/lib/lowcode/painter/panel-section/FieldsSetting.js +2 -2
  170. package/lib/lowcode/painter/panel-section/GroupClassSelector.js +63 -0
  171. package/lib/lowcode/painter/panel-section/PageVars.js +1 -1
  172. package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +1 -0
  173. package/lib/lowcode/painter/panel-section/TabItems.js +1 -1
  174. package/lib/lowcode/painter/panel-section/TableTopFilter.js +3 -3
  175. package/lib/lowcode/painter/style/action-bind-modal.less +5 -3
  176. package/lib/lowcode/painter/style/design.less +26 -7
  177. package/lib/lowcode/painter/style/dragdrop.less +46 -0
  178. package/lib/lowcode/painter/style/list-editor.less +5 -3
  179. package/lib/lowcode/painter/style/number-input.less +3 -1
  180. package/lib/lowcode/painter/style/outline.less +3 -1
  181. package/lib/lowcode/painter/style/panel-attrs.less +7 -3
  182. package/lib/lowcode/painter/style/panel.less +9 -7
  183. package/lib/lowcode/painter/style/radio.less +1 -1
  184. package/lib/lowcode/painter/style/ribbon.less +4 -2
  185. package/lib/lowcode/painter/svg/code.svg +3 -0
  186. package/lib/lowcode/painter/svg/expect.svg +9 -0
  187. package/lib/lowcode/view/lc-components/CardList/index.js +480 -11
  188. package/lib/lowcode/view/lc-components/CardList/meta.json +255 -73
  189. package/lib/lowcode/view/lc-components/Dialog/FunctionDesign.js +13 -5
  190. package/lib/lowcode/view/lc-components/Dialog/index.js +15 -5
  191. package/lib/lowcode/view/lc-components/Dialog/index.less +4 -0
  192. package/lib/lowcode/view/lc-components/Dialog/meta.json +72 -18
  193. package/lib/lowcode/view/lc-components/Drawer/FunctionDesign.js +52 -8
  194. package/lib/lowcode/view/lc-components/Drawer/index.js +138 -23
  195. package/lib/lowcode/view/lc-components/Drawer/index.less +11 -8
  196. package/lib/lowcode/view/lc-components/Drawer/meta.json +136 -25
  197. package/lib/lowcode/view/lc-components/Form/FunctionDesign.js +2 -1
  198. package/lib/lowcode/view/lc-components/Form/index.js +44 -27
  199. package/lib/lowcode/view/lc-components/Form/meta.json +44 -8
  200. package/lib/lowcode/view/lc-components/GroupTree/FunctionDesign.js +17 -0
  201. package/lib/lowcode/view/lc-components/GroupTree/FunctionLive.js +17 -0
  202. package/lib/lowcode/view/lc-components/GroupTree/FunctionPreview.js +17 -0
  203. package/lib/lowcode/view/lc-components/GroupTree/index.js +220 -0
  204. package/lib/lowcode/view/lc-components/GroupTree/index.less +12 -0
  205. package/lib/lowcode/view/lc-components/GroupTree/meta.json +83 -0
  206. package/lib/lowcode/view/lc-components/Iframe/index.js +55 -5
  207. package/lib/lowcode/view/lc-components/Iframe/meta.json +3 -4
  208. package/lib/lowcode/view/lc-components/ImEx/meta.json +1 -1
  209. package/lib/lowcode/view/lc-components/Image/index.js +80 -4
  210. package/lib/lowcode/view/lc-components/Image/index.less +27 -0
  211. package/lib/lowcode/view/lc-components/Image/meta.json +51 -16
  212. package/lib/lowcode/view/lc-components/Link/index.js +52 -4
  213. package/lib/lowcode/view/lc-components/Link/index.less +15 -0
  214. package/lib/lowcode/view/lc-components/Link/meta.json +9 -9
  215. package/lib/lowcode/view/lc-components/Table/index.js +5 -6
  216. package/lib/lowcode/view/lc-components/Table/meta.json +1 -1
  217. package/lib/lowcode/view/lc-components/Tabs/FunctionDesign.js +38 -2
  218. package/lib/lowcode/view/lc-components/Tabs/index.js +1 -1
  219. package/lib/lowcode/view/lc-components/Tabs/meta.json +1 -1
  220. package/lib/lowcode/view/lc-components/Tree/index.js +20 -18
  221. package/lib/lowcode/view/lc-components/Tree/meta.json +2 -2
  222. package/lib/utils/grid.js +2 -2
  223. package/package.json +10 -9
  224. package/es/lowcode/painter/style/treedragdrop.less +0 -19
  225. package/es/lowcode/view/lc-components/Form/index.less +0 -5
  226. package/lib/lowcode/painter/style/treedragdrop.less +0 -19
  227. package/lib/lowcode/view/lc-components/Form/index.less +0 -5
@@ -9,7 +9,7 @@
9
9
  "props": [
10
10
  {
11
11
  "key": "id",
12
- "desc": "唯一标识",
12
+ "name": "唯一标识",
13
13
  "type": "string",
14
14
  "disabled": true
15
15
  },
@@ -31,77 +31,265 @@
31
31
  },
32
32
  {
33
33
  "key": "autoLoad",
34
- "name": "首次数据自动加载",
34
+ "name": "自动加载",
35
35
  "desc": "首次数据是否自动加载,若存在必须带搜索条件再加载的情况,需要关闭",
36
- "type": "boolean",
36
+ "type": "switch",
37
37
  "default": true
38
38
  },
39
39
  {
40
40
  "key": "readOnly",
41
- "name": "是否只读",
42
- "desc": "卡片列表是否只读",
43
- "type": "boolean",
41
+ "name": "只读",
42
+ "type": "switch",
44
43
  "default": false
45
44
  },
46
45
  {
47
- "key": "isFlow",
48
- "name": "是否流式",
49
- "desc": "是否流式(不分页)",
50
- "type": "boolean",
46
+ "key": "draggable",
47
+ "name": "拖拽排序",
48
+ "type": "switch",
51
49
  "default": false
52
50
  },
53
51
  {
54
- "key": "defaultPageSize",
55
- "name": "默认分页数",
56
- "desc": "isFlow为false时设置,默认单页分页数",
52
+ "key": "col",
53
+ "name": "列数",
57
54
  "type": "number",
58
- "default": 30
55
+ "default": 4
59
56
  },
60
57
  {
61
- "key": "batchOperations",
62
- "name": "批量操作",
63
- "desc": "批量操作配置",
64
- "type": "_CardListActionSelector"
65
- },
66
- {
67
- "key": "actionTitle",
68
- "name": "操作列标题",
69
- "desc": "操作列的标题",
70
- "type": "_I18nInput",
71
- "default": "操作列"
58
+ "key": "paginationSetting",
59
+ "name": "分页设置",
60
+ "type": "group",
61
+ "props": [
62
+ {
63
+ "key": "pagination",
64
+ "name": "开启分页",
65
+ "type": "switch",
66
+ "default": true
67
+ },
68
+ {
69
+ "key": "pageSize",
70
+ "name": "每页行数",
71
+ "type": "number",
72
+ "default": 40
73
+ }
74
+ ]
72
75
  },
73
76
  {
74
- "key": "actionWidth",
75
- "name": "操作列宽度",
76
- "desc": "操作列宽度设置",
77
- "type": "number",
78
- "default": 100
77
+ "key": "styleSetting",
78
+ "name": "视觉设置",
79
+ "type": "group",
80
+ "default": true,
81
+ "next": {
82
+ "name": "视觉设置",
83
+ "props": [
84
+ {
85
+ "key": "nocardBoxborder",
86
+ "name": "无边框风格",
87
+ "type": "switch",
88
+ "default": false
89
+ },
90
+ {
91
+ "key": "showAvatar",
92
+ "name": "显示图标",
93
+ "type": "switch",
94
+ "default": true
95
+ },
96
+ {
97
+ "key": "avatarUrl",
98
+ "name": "图标地址",
99
+ "type": "_JSEditor",
100
+ "defaultCode": "function avatarUrl(record) { \n return null; \n}",
101
+ "mustConfirm": true,
102
+ "wrapper": "collapse",
103
+ "wrapperProps": {
104
+ "suppressIcon": true
105
+ }
106
+ },
107
+ {
108
+ "key": "showTitle",
109
+ "name": "显示标题",
110
+ "type": "switch",
111
+ "default": true
112
+ },
113
+ {
114
+ "key": "renderTitle",
115
+ "name": "标题内容",
116
+ "type": "_JSEditor",
117
+ "defaultCode": "function renderTitle(record) { \n return record.sname; \n}",
118
+ "mustConfirm": true,
119
+ "wrapper": "collapse",
120
+ "wrapperProps": {
121
+ "suppressIcon": true
122
+ }
123
+ },
124
+ {
125
+ "key": "showDesc",
126
+ "name": "显示描述",
127
+ "type": "switch",
128
+ "default": true
129
+ },
130
+ {
131
+ "key": "describeLines",
132
+ "name": "描述最大展示行",
133
+ "type": "number",
134
+ "default": 2
135
+ },
136
+ {
137
+ "key": "renderDescribe",
138
+ "name": "描述内容",
139
+ "type": "_JSEditor",
140
+ "defaultCode": "function renderDescribe(record) { \n return record.describe; \n}",
141
+ "mustConfirm": true,
142
+ "wrapper": "collapse",
143
+ "wrapperProps": {
144
+ "suppressIcon": true
145
+ }
146
+ },
147
+ {
148
+ "key": "renderContent",
149
+ "name": "自定义",
150
+ "type": "_JSEditor",
151
+ "defaultCode": "function renderContent(record) { \n return null; \n}",
152
+ "mustConfirm": true,
153
+ "wrapper": "collapse",
154
+ "wrapperProps": {
155
+ "suppressIcon": true
156
+ }
157
+ }
158
+ ]
159
+ }
79
160
  },
80
161
  {
81
- "key": "actionHidden",
82
- "name": "操作列是否隐藏",
83
- "desc": "操作列是否隐藏",
84
- "type": "boolean",
85
- "default": false
162
+ "key": "addCard",
163
+ "name": "新增卡片设置",
164
+ "type": "group",
165
+ "props": [
166
+ {
167
+ "key": "showAddCard",
168
+ "name": "展示新增卡片",
169
+ "type": "switch",
170
+ "default": false
171
+ },
172
+ {
173
+ "key": "addCardHeight",
174
+ "name": "新增卡片高度",
175
+ "type": "number",
176
+ "default": 240
177
+ },
178
+ {
179
+ "key": "addCardWords",
180
+ "name": "新增卡片内容",
181
+ "type": "string",
182
+ "default": "新建"
183
+ }
184
+ ]
86
185
  },
87
186
  {
88
- "key": "maxWebShownActionCount",
89
- "name": "操作列最大展示数",
90
- "desc": "操作列最大展示数,超出最大数变为最大展示数-1+更多",
91
- "type": "number",
92
- "default": 2
187
+ "key": "topSetting",
188
+ "name": "顶部操作",
189
+ "type": "group",
190
+ "default": true,
191
+ "next": {
192
+ "name": "顶部操作",
193
+ "props": [
194
+ {
195
+ "key": "topActionGroup",
196
+ "name": "顶部按钮组",
197
+ "type": "_ActionsEditor",
198
+ "default": {
199
+ "display": "button",
200
+ "max": 2,
201
+ "moreText": "操作",
202
+ "todoList": []
203
+ },
204
+ "defaultCode": "function todo() { \n \n}",
205
+ "wrapper": "collapse"
206
+ },
207
+ {
208
+ "key": "topFilter",
209
+ "name": "顶部过滤器",
210
+ "type": "_TableTopFilter",
211
+ "wrapper": "collapse"
212
+ }
213
+ ]
214
+ }
93
215
  },
94
216
  {
95
- "key": "actions",
96
- "name": "操作项",
97
- "desc": "单行操作项",
98
- "type": "_ActionSelector"
217
+ "key": "batchOperations_group",
218
+ "name": "批量操作",
219
+ "type": "group",
220
+ "default": true,
221
+ "next": {
222
+ "name": "批量操作",
223
+ "props": [
224
+ {
225
+ "key": "rowSelection",
226
+ "name": "开启选择器",
227
+ "type": "switch",
228
+ "default": false
229
+ },
230
+ {
231
+ "key": "disabledCheckbox",
232
+ "name": "不可选卡片",
233
+ "type": "_JSEditor",
234
+ "defaultCode": "function disabledCheckbox(record) { \n return false; \n}",
235
+ "mustConfirm": true,
236
+ "wrapper": "collapse",
237
+ "wrapperProps": {
238
+ "suppressIcon": true
239
+ }
240
+ },
241
+ {
242
+ "key": "batchOperations",
243
+ "name": "卡片操作项",
244
+ "type": "_ActionsEditor",
245
+ "default": {
246
+ "todoList": []
247
+ },
248
+ "suppressDisplay": true,
249
+ "suppressMore": true,
250
+ "suppressMax": true,
251
+ "defaultCode": "function onActionClick(data, params) {\n\n}",
252
+ "wrapper": "collapse",
253
+ "wrapperProps": {
254
+ "suppressIcon": true
255
+ }
256
+ }
257
+ ]
258
+ }
99
259
  },
100
260
  {
101
- "key": "batchActions",
102
- "name": "批量操作项",
103
- "desc": "批量操作项",
104
- "type": "_ActionSelector"
261
+ "key": "actionsColumn",
262
+ "name": "操作列",
263
+ "type": "group",
264
+ "default": true,
265
+ "next": {
266
+ "name": "操作列",
267
+ "props": [
268
+ {
269
+ "key": "suppressActions",
270
+ "name": "隐藏操作列",
271
+ "type": "switch",
272
+ "default": false
273
+ },
274
+ {
275
+ "key": "actions",
276
+ "name": "卡片操作项",
277
+ "type": "_ActionsEditor",
278
+ "default": {
279
+ "max": 3,
280
+ "todoList": []
281
+ },
282
+ "suppressDisplay": true,
283
+ "suppressMore": true,
284
+ "suppressIcon": false,
285
+ "defaultCode": "function onActionClick(data, params) {\n\n}",
286
+ "wrapper": "collapse",
287
+ "wrapperProps": {
288
+ "suppressIcon": true
289
+ }
290
+ }
291
+ ]
292
+ }
105
293
  }
106
294
  ],
107
295
  "advance": {
@@ -110,44 +298,38 @@
110
298
  "key": "onMount",
111
299
  "name": "组件首次渲染时",
112
300
  "desc": "在组件首次渲染时,执行方法",
113
- "func": "(params)=>{\n\t\n}"
301
+ "func": "function onMount(params)=>{\n\t\n}"
114
302
  },
115
303
  {
116
304
  "key": "onUnmount",
117
305
  "name": "组件卸载时",
118
306
  "desc": "在组件卸载时,执行方法。",
119
- "func": "(params)=>{\n\t\n}"
120
- },
121
- {
122
- "key": "onBatchOperationsClick",
123
- "name": "批量操作点击",
124
- "desc": "点击操作的回调函数",
125
- "func": "(key, selectedRows)=>{\n\t\n}"
307
+ "func": "function onUnmount()=>{\n\t\n}"
126
308
  },
127
309
  {
128
- "key": "onActionClick",
129
- "name": "操作列点击",
130
- "desc": "点击操作的回调函数",
131
- "func": "(itemData)=>{\n\t\n}"
310
+ "key": "onAddCardClick",
311
+ "name": "新增卡片点击",
312
+ "desc": "点击新增卡片行时,执行方法",
313
+ "func": "function onAddCardClick()=>{\n\t\n}"
132
314
  },
133
315
  {
134
- "key": "actionRender",
135
- "name": "操作列定制渲染",
136
- "desc": "返回为false时,该操作不可见",
137
- "func": "(title, rowData)=>{\n\t\n}"
316
+ "key": "onCardClick",
317
+ "name": "卡片单击",
318
+ "desc": "单击卡片行时,执行方法",
319
+ "func": "function onCardClick(data, e)=>{\n\t\n}"
138
320
  },
139
321
  {
140
- "key": "onRowClick",
141
- "name": "行单击",
142
- "desc": "单击表格行时,执行方法",
143
- "func": "(data, rowIndex, params)=>{\n\t\n}"
322
+ "key": "onCardDelete",
323
+ "name": "卡片删除",
324
+ "desc": "单击卡片删除图标,执行方法",
325
+ "func": "function onCardDelete(data, e)=>{\n\t\n}"
144
326
  },
145
327
  {
146
- "key": "onCardRender",
147
- "name": "操作列点击",
148
- "desc": "点击操作的回调函数",
149
- "func": "(itemData)=>{\n\t\n}"
328
+ "key": "onDrop",
329
+ "name": "拖拽事件",
330
+ "desc": "节点拖拽事件",
331
+ "func": "function onDrop(dragNodeProps, targetNodeProps, evt) {\n\t\n}"
150
332
  }
151
333
  ]
152
334
  }
153
- }
335
+ }
@@ -18,24 +18,34 @@ var _ContextProvider = require("../../../engine/provider/ContextProvider");
18
18
  var _classnames = _interopRequireDefault(require("classnames"));
19
19
  require("./index.less");
20
20
  var _boxPropsDefault = _interopRequireDefault(require("../../../engine/meta/box.props.default.json"));
21
- var _excluded = ["id", "children", "className"];
21
+ var _excluded = ["id", "children", "className", "defaultOpen"];
22
22
  var FunctionDesign = function FunctionDesign(_ref) {
23
23
  var id = _ref.id,
24
24
  children = _ref.children,
25
25
  className = _ref.className,
26
+ defaultOpen = _ref.defaultOpen,
26
27
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
27
28
  var apiRef = (0, _react.useRef)();
28
29
  var ctx = (0, _ContextProvider.useContext)();
29
30
  (0, _react.useImperativeHandle)(apiRef, function () {
30
31
  return {
31
32
  doOpen: function doOpen() {
32
- ctx.componentMap.get(id).api.getSelfDom().closest('.ant-modal-root').style.display = 'block';
33
+ var _self = ctx.componentMap.get(id).api.getSelfDom();
34
+ _self.closest('#design-workspace').style.overflow = 'hidden';
35
+ _self.closest('.ant-modal-root').style.display = 'block';
33
36
  },
34
37
  doClose: function doClose() {
35
- ctx.componentMap.get(id).api.getSelfDom().closest('.ant-modal-root').style.display = 'none';
38
+ var _self = ctx.componentMap.get(id).api.getSelfDom();
39
+ _self.closest('#design-workspace').style.overflow = '';
40
+ _self.closest('.ant-modal-root').style.display = 'none';
36
41
  }
37
42
  };
38
43
  }, []);
44
+ (0, _react.useEffect)(function () {
45
+ if (defaultOpen) {
46
+ ctx.componentMap.get(id).api.getSelfDom().closest('#design-workspace').style.overflow = 'hidden';
47
+ }
48
+ }, [defaultOpen]);
39
49
  (0, _ahooks.useCreation)(function () {
40
50
  if (children !== null && children !== void 0 && children.length) return;
41
51
  ctx.$subscriber(ctx.topics.COMPONENT_APPEND).once(function (_ref2) {
@@ -56,8 +66,6 @@ var FunctionDesign = function FunctionDesign(_ref) {
56
66
  }, props, {
57
67
  $apiRef: apiRef,
58
68
  $designProps: {
59
- closable: false,
60
- maskClosable: false,
61
69
  visible: true,
62
70
  zIndex: 10
63
71
  }
@@ -38,7 +38,10 @@ var LCDialog = function LCDialog(_ref) {
38
38
  wrapClassName = _ref.wrapClassName,
39
39
  maskStyle = _ref.maskStyle,
40
40
  defaultOpen = _ref.defaultOpen,
41
+ closable = _ref.closable,
41
42
  mask = _ref.mask,
43
+ padding = _ref.padding,
44
+ closeType = _ref.closeType,
42
45
  okText = _ref.okText,
43
46
  cancelText = _ref.cancelText,
44
47
  destroyOnClose = _ref.destroyOnClose,
@@ -84,15 +87,18 @@ var LCDialog = function LCDialog(_ref) {
84
87
  while (1) switch (_context.prev = _context.next) {
85
88
  case 0:
86
89
  setLoading(true);
87
- _context.next = 3;
90
+ _context.prev = 1;
91
+ _context.next = 4;
88
92
  return ctx.doAction(advance.events.onOk);
89
- case 3:
90
- setLoading(false);
91
93
  case 4:
94
+ _context.prev = 4;
95
+ setLoading(false);
96
+ return _context.finish(4);
97
+ case 7:
92
98
  case "end":
93
99
  return _context.stop();
94
100
  }
95
- }, _callee);
101
+ }, _callee, null, [[1,, 4, 7]]);
96
102
  })));
97
103
  var _footer = (0, _ahooks.useCreation)(function () {
98
104
  if (!footer) return {
@@ -162,13 +168,17 @@ var LCDialog = function LCDialog(_ref) {
162
168
  visible: open,
163
169
  width: width,
164
170
  mask: mask,
171
+ closable: closable,
165
172
  maskStyle: maskStyle,
166
173
  bodyStyle: {
167
174
  height: height,
168
175
  overflowY: 'auto',
169
- marginTop: 0
176
+ marginTop: 0,
177
+ padding: padding
170
178
  },
171
179
  wrapClassName: (0, _classnames.default)(_index2.default['lc-component-dialog-wrapper'], (0, _defineProperty2.default)({}, wrapClassName, !!wrapClassName)),
180
+ maskClosable: !!(closeType !== null && closeType !== void 0 && closeType.includes('maskClosable')),
181
+ keyboard: !!(closeType !== null && closeType !== void 0 && closeType.includes('keyboard')),
172
182
  getContainer: (0, _lodash.isNil)(getContainer) ? function () {
173
183
  return document.getElementById('root') || document.getElementById('react-content') || document.body;
174
184
  } : getContainer
@@ -1,6 +1,10 @@
1
1
  :global {
2
2
  .runtime-design {
3
3
  position: absolute !important;
4
+ .ant-modal {
5
+ transition: none !important;
6
+ transform: none !important;
7
+ }
4
8
  }
5
9
  div.ant-modal-root:has(> .runtime-design) {
6
10
  display: none;
@@ -64,6 +64,30 @@
64
64
  ],
65
65
  "default": "50vh"
66
66
  },
67
+ {
68
+ "key": "padding",
69
+ "name": "内边距",
70
+ "type": "select",
71
+ "options": [
72
+ {
73
+ "label": "大(24px)",
74
+ "value": 24
75
+ },
76
+ {
77
+ "label": "中(16px)",
78
+ "value": 16
79
+ },
80
+ {
81
+ "label": "小(8px)",
82
+ "value": 8
83
+ },
84
+ {
85
+ "label": "无(0px)",
86
+ "value": 0
87
+ }
88
+ ],
89
+ "default": 16
90
+ },
67
91
  {
68
92
  "key": "defaultOpen",
69
93
  "name": "默认显示",
@@ -72,36 +96,66 @@
72
96
  "default": false
73
97
  },
74
98
  {
75
- "key": "destroyOnClose",
76
- "name": "关闭销毁",
77
- "desc": "关闭时销毁对话框里的子元素",
99
+ "key": "mask",
100
+ "name": "显示遮罩",
78
101
  "type": "switch",
79
102
  "default": true
80
103
  },
81
104
  {
82
- "key": "mask",
83
- "name": "显示遮罩",
105
+ "key": "closable",
106
+ "name": "关闭按钮",
107
+ "desc": "是否显示右上角的关闭按钮",
84
108
  "type": "switch",
85
109
  "default": true
86
110
  },
87
111
  {
88
- "key": "okText",
89
- "name": "确认文字",
90
- "type": "_I18nInput",
91
- "default": "确定"
112
+ "key": "destroyOnClose",
113
+ "name": "关闭销毁",
114
+ "desc": "关闭时销毁对话框里的子元素",
115
+ "type": "switch",
116
+ "default": true
92
117
  },
93
118
  {
94
- "key": "cancelText",
95
- "name": "取消文字",
96
- "type": "_I18nInput",
97
- "default": "取消"
119
+ "key": "closeType",
120
+ "name": "关闭方式",
121
+ "type": "checkbox",
122
+ "options": [
123
+ {
124
+ "label": "点击遮罩",
125
+ "value": "maskClosable"
126
+ },
127
+ {
128
+ "label": "ESC",
129
+ "value": "keyboard"
130
+ }
131
+ ],
132
+ "defaultValue": ["maskClosable"]
98
133
  },
99
134
  {
100
- "key": "footer",
101
- "name": "显示footer",
102
- "desc": "是否显示底部按钮区域",
103
- "type": "switch",
104
- "default": true
135
+ "key": "footerSetting",
136
+ "name": "底部按钮配置",
137
+ "type": "group",
138
+ "props": [
139
+ {
140
+ "key": "footer",
141
+ "name": "显示footer",
142
+ "desc": "是否显示底部按钮区域",
143
+ "type": "switch",
144
+ "default": true
145
+ },
146
+ {
147
+ "key": "okText",
148
+ "name": "确认文字",
149
+ "type": "_I18nInput",
150
+ "default": "确定"
151
+ },
152
+ {
153
+ "key": "cancelText",
154
+ "name": "取消文字",
155
+ "type": "_I18nInput",
156
+ "default": "取消"
157
+ }
158
+ ]
105
159
  },
106
160
  {
107
161
  "key": "btnGroup",