@luck-design-biz/luckda 0.0.24-2 → 0.0.25

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 (217) hide show
  1. package/es/components/LDActions/index.js +130 -0
  2. package/es/components/LDActions/index.less +48 -0
  3. package/es/components/LdFormList/index.js +1 -1
  4. package/es/components/LdGrid/index.js +9 -3
  5. package/es/components/LdTree/index.js +32 -5
  6. package/es/components/LdTree/index.less +6 -1
  7. package/es/index.js +1 -0
  8. package/es/locales/zh-CN.js +151 -0
  9. package/es/lowcode/constants/api-url.js +71 -12
  10. package/es/lowcode/constants/index.js +3 -1
  11. package/es/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +32 -0
  12. package/es/lowcode/engine/factory/panel-item-factory/index.js +2 -0
  13. package/es/lowcode/engine/meta/box.props.default.json +1 -3
  14. package/es/lowcode/engine/meta/box.props.json +1 -3
  15. package/es/lowcode/engine/meta/button.props.default.json +1 -1
  16. package/es/lowcode/engine/meta/button.props.json +1 -1
  17. package/es/lowcode/engine/meta/cardlist.props.default.json +0 -1
  18. package/es/lowcode/engine/meta/cardlist.props.json +1 -2
  19. package/es/lowcode/engine/meta/dialog.props.default.json +0 -1
  20. package/es/lowcode/engine/meta/dialog.props.json +0 -1
  21. package/es/lowcode/engine/meta/drawer.props.default.json +0 -1
  22. package/es/lowcode/engine/meta/drawer.props.json +0 -1
  23. package/es/lowcode/engine/meta/form.props.default.json +0 -1
  24. package/es/lowcode/engine/meta/form.props.json +1 -2
  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 +1 -1
  30. package/es/lowcode/engine/meta/imex.props.json +1 -1
  31. package/es/lowcode/engine/meta/js-editor/auto-complete.json +132 -26
  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 +1 -1
  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/local/local.zh-cn.js +97 -0
  39. package/es/lowcode/engine/meta/section.props.default.json +1 -1
  40. package/es/lowcode/engine/meta/section.props.json +1 -1
  41. package/es/lowcode/engine/meta/split.props.default.json +1 -1
  42. package/es/lowcode/engine/meta/split.props.json +1 -1
  43. package/es/lowcode/engine/meta/table.props.default.json +18 -2
  44. package/es/lowcode/engine/meta/table.props.json +207 -32
  45. package/es/lowcode/engine/meta/tabs.props.default.json +0 -1
  46. package/es/lowcode/engine/meta/tabs.props.json +0 -1
  47. package/es/lowcode/engine/meta/text.props.default.json +1 -1
  48. package/es/lowcode/engine/meta/text.props.json +1 -1
  49. package/es/lowcode/engine/meta/tree.props.default.json +9 -4
  50. package/es/lowcode/engine/meta/tree.props.json +101 -55
  51. package/es/lowcode/engine/provider/{ContextProvider.js → ContextProvider/index.js} +71 -41
  52. package/es/lowcode/engine/tools/helper.js +29 -1
  53. package/es/lowcode/engine/tools/usePromiseState.js +7 -6
  54. package/es/lowcode/painter/Panel.js +50 -133
  55. package/es/lowcode/painter/Ribbon.js +1 -1
  56. package/es/lowcode/painter/components/ActionBindModal.js +180 -0
  57. package/es/lowcode/painter/components/AdvancePanel.js +68 -0
  58. package/es/lowcode/painter/components/AttrsPanel.js +134 -0
  59. package/es/lowcode/painter/components/Collapse.js +12 -7
  60. package/es/lowcode/painter/components/FieldSelector.js +44 -0
  61. package/es/lowcode/painter/components/ListEditor.js +4 -2
  62. package/es/lowcode/painter/components/PopConfirm.js +10 -3
  63. package/es/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
  64. package/es/lowcode/painter/components/code-editor/JSEditor.js +25 -14
  65. package/es/lowcode/painter/components/code-editor/JsonEditor.js +41 -0
  66. package/es/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/ActionEditor.js +10 -3
  67. package/es/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +36 -8
  68. package/es/lowcode/painter/panel-section/ImpExp.js +91 -0
  69. package/es/lowcode/painter/panel-section/JSEditor.js +48 -0
  70. package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
  71. package/es/lowcode/painter/panel-section/StylePanel/StyleContext.js +1 -1
  72. package/es/lowcode/painter/panel-section/TableTopFilter.js +306 -0
  73. package/es/lowcode/painter/style/action-bind-modal.less +99 -0
  74. package/es/lowcode/painter/style/design.less +1 -1
  75. package/es/lowcode/painter/style/impexp.less +7 -0
  76. package/es/lowcode/painter/style/panel-attrs.less +43 -0
  77. package/es/lowcode/painter/style/panel.less +6 -37
  78. package/es/lowcode/painter/style/pop-confirm.less +9 -2
  79. package/es/lowcode/view/lc-components/Box/index.js +20 -4
  80. package/es/lowcode/view/lc-components/Box/index.less +0 -1
  81. package/es/lowcode/view/lc-components/Box/meta.json +1 -3
  82. package/es/lowcode/view/lc-components/Button/meta.json +1 -1
  83. package/es/lowcode/view/lc-components/CardList/meta.json +1 -2
  84. package/es/lowcode/view/lc-components/Dialog/meta.json +0 -1
  85. package/es/lowcode/view/lc-components/Drawer/index.js +16 -0
  86. package/es/lowcode/view/lc-components/Drawer/meta.json +0 -1
  87. package/es/lowcode/view/lc-components/Form/meta.json +1 -2
  88. package/es/lowcode/view/lc-components/Iframe/meta.json +1 -1
  89. package/es/lowcode/view/lc-components/ImEx/meta.json +1 -1
  90. package/es/lowcode/view/lc-components/Image/meta.json +1 -1
  91. package/es/lowcode/view/lc-components/JSX/meta.json +1 -1
  92. package/es/lowcode/view/lc-components/Layout/FunctionDesign.js +6 -9
  93. package/es/lowcode/view/lc-components/Layout/meta.json +1 -1
  94. package/es/lowcode/view/lc-components/Link/meta.json +1 -1
  95. package/es/lowcode/view/lc-components/Section/meta.json +1 -1
  96. package/es/lowcode/view/lc-components/Split/meta.json +1 -1
  97. package/es/lowcode/view/lc-components/Table/FunctionDesign.js +35 -2
  98. package/es/lowcode/view/lc-components/Table/components/TopFilter.js +96 -0
  99. package/es/lowcode/view/lc-components/Table/index.js +255 -35
  100. package/es/lowcode/view/lc-components/Table/meta.json +179 -32
  101. package/es/lowcode/view/lc-components/Tabs/meta.json +0 -1
  102. package/es/lowcode/view/lc-components/Text/meta.json +1 -1
  103. package/es/lowcode/view/lc-components/Tree/FunctionDesign.js +48 -3
  104. package/es/lowcode/view/lc-components/Tree/index.js +77 -6
  105. package/es/lowcode/view/lc-components/Tree/index.less +2 -0
  106. package/es/lowcode/view/lc-components/Tree/meta.json +97 -55
  107. package/es/lowcode/view/lc-components/Wrapper.js +2 -2
  108. package/lib/components/LDActions/index.js +138 -0
  109. package/lib/components/LDActions/index.less +48 -0
  110. package/lib/components/LdFormList/index.js +1 -1
  111. package/lib/components/LdGrid/index.js +8 -2
  112. package/lib/components/LdTree/index.js +31 -4
  113. package/lib/components/LdTree/index.less +6 -1
  114. package/lib/index.js +8 -0
  115. package/lib/locales/zh-CN.js +157 -0
  116. package/lib/lowcode/constants/api-url.js +71 -12
  117. package/lib/lowcode/constants/index.js +4 -2
  118. package/lib/lowcode/engine/factory/panel-item-factory/CheckboxStrategy.js +38 -0
  119. package/lib/lowcode/engine/factory/panel-item-factory/index.js +2 -0
  120. package/lib/lowcode/engine/meta/box.props.default.json +1 -3
  121. package/lib/lowcode/engine/meta/box.props.json +1 -3
  122. package/lib/lowcode/engine/meta/button.props.default.json +1 -1
  123. package/lib/lowcode/engine/meta/button.props.json +1 -1
  124. package/lib/lowcode/engine/meta/cardlist.props.default.json +0 -1
  125. package/lib/lowcode/engine/meta/cardlist.props.json +1 -2
  126. package/lib/lowcode/engine/meta/dialog.props.default.json +0 -1
  127. package/lib/lowcode/engine/meta/dialog.props.json +0 -1
  128. package/lib/lowcode/engine/meta/drawer.props.default.json +0 -1
  129. package/lib/lowcode/engine/meta/drawer.props.json +0 -1
  130. package/lib/lowcode/engine/meta/form.props.default.json +0 -1
  131. package/lib/lowcode/engine/meta/form.props.json +1 -2
  132. package/lib/lowcode/engine/meta/iframe.props.default.json +1 -1
  133. package/lib/lowcode/engine/meta/iframe.props.json +1 -1
  134. package/lib/lowcode/engine/meta/image.props.default.json +1 -1
  135. package/lib/lowcode/engine/meta/image.props.json +1 -1
  136. package/lib/lowcode/engine/meta/imex.props.default.json +1 -1
  137. package/lib/lowcode/engine/meta/imex.props.json +1 -1
  138. package/lib/lowcode/engine/meta/js-editor/auto-complete.json +132 -26
  139. package/lib/lowcode/engine/meta/jsx.props.default.json +1 -1
  140. package/lib/lowcode/engine/meta/jsx.props.json +1 -1
  141. package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
  142. package/lib/lowcode/engine/meta/layout.props.json +1 -1
  143. package/lib/lowcode/engine/meta/link.props.default.json +1 -1
  144. package/lib/lowcode/engine/meta/link.props.json +1 -1
  145. package/lib/lowcode/engine/meta/local/local.zh-cn.js +103 -0
  146. package/lib/lowcode/engine/meta/section.props.default.json +1 -1
  147. package/lib/lowcode/engine/meta/section.props.json +1 -1
  148. package/lib/lowcode/engine/meta/split.props.default.json +1 -1
  149. package/lib/lowcode/engine/meta/split.props.json +1 -1
  150. package/lib/lowcode/engine/meta/table.props.default.json +18 -2
  151. package/lib/lowcode/engine/meta/table.props.json +207 -32
  152. package/lib/lowcode/engine/meta/tabs.props.default.json +0 -1
  153. package/lib/lowcode/engine/meta/tabs.props.json +0 -1
  154. package/lib/lowcode/engine/meta/text.props.default.json +1 -1
  155. package/lib/lowcode/engine/meta/text.props.json +1 -1
  156. package/lib/lowcode/engine/meta/tree.props.default.json +9 -4
  157. package/lib/lowcode/engine/meta/tree.props.json +101 -55
  158. package/lib/lowcode/engine/provider/{ContextProvider.js → ContextProvider/index.js} +70 -40
  159. package/lib/lowcode/engine/tools/helper.js +31 -0
  160. package/lib/lowcode/engine/tools/usePromiseState.js +6 -5
  161. package/lib/lowcode/painter/Panel.js +48 -131
  162. package/lib/lowcode/painter/Ribbon.js +1 -1
  163. package/lib/lowcode/painter/components/ActionBindModal.js +188 -0
  164. package/lib/lowcode/painter/components/AdvancePanel.js +76 -0
  165. package/lib/lowcode/painter/components/AttrsPanel.js +142 -0
  166. package/lib/lowcode/painter/components/Collapse.js +12 -7
  167. package/lib/lowcode/painter/components/FieldSelector.js +52 -0
  168. package/lib/lowcode/painter/components/ListEditor.js +4 -2
  169. package/lib/lowcode/painter/components/PopConfirm.js +10 -3
  170. package/lib/lowcode/painter/components/code-editor/BaseEditor.js +14 -2
  171. package/lib/lowcode/painter/components/code-editor/JSEditor.js +25 -14
  172. package/lib/lowcode/painter/components/code-editor/JsonEditor.js +48 -0
  173. package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/ActionEditor.js +10 -3
  174. package/lib/lowcode/painter/{components/actions-editor → panel-section/ActionsEditor}/index.js +35 -7
  175. package/lib/lowcode/painter/panel-section/ImpExp.js +98 -0
  176. package/lib/lowcode/painter/panel-section/JSEditor.js +56 -0
  177. package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +2 -2
  178. package/lib/lowcode/painter/panel-section/StylePanel/StyleContext.js +1 -1
  179. package/lib/lowcode/painter/panel-section/TableTopFilter.js +314 -0
  180. package/lib/lowcode/painter/style/action-bind-modal.less +99 -0
  181. package/lib/lowcode/painter/style/design.less +1 -1
  182. package/lib/lowcode/painter/style/impexp.less +7 -0
  183. package/lib/lowcode/painter/style/panel-attrs.less +43 -0
  184. package/lib/lowcode/painter/style/panel.less +6 -37
  185. package/lib/lowcode/painter/style/pop-confirm.less +9 -2
  186. package/lib/lowcode/view/lc-components/Box/index.js +17 -2
  187. package/lib/lowcode/view/lc-components/Box/index.less +0 -1
  188. package/lib/lowcode/view/lc-components/Box/meta.json +1 -3
  189. package/lib/lowcode/view/lc-components/Button/meta.json +1 -1
  190. package/lib/lowcode/view/lc-components/CardList/meta.json +1 -2
  191. package/lib/lowcode/view/lc-components/Dialog/meta.json +0 -1
  192. package/lib/lowcode/view/lc-components/Drawer/index.js +16 -0
  193. package/lib/lowcode/view/lc-components/Drawer/meta.json +0 -1
  194. package/lib/lowcode/view/lc-components/Form/meta.json +1 -2
  195. package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -1
  196. package/lib/lowcode/view/lc-components/ImEx/meta.json +1 -1
  197. package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
  198. package/lib/lowcode/view/lc-components/JSX/meta.json +1 -1
  199. package/lib/lowcode/view/lc-components/Layout/FunctionDesign.js +6 -9
  200. package/lib/lowcode/view/lc-components/Layout/meta.json +1 -1
  201. package/lib/lowcode/view/lc-components/Link/meta.json +1 -1
  202. package/lib/lowcode/view/lc-components/Section/meta.json +1 -1
  203. package/lib/lowcode/view/lc-components/Split/meta.json +1 -1
  204. package/lib/lowcode/view/lc-components/Table/FunctionDesign.js +37 -3
  205. package/lib/lowcode/view/lc-components/Table/components/TopFilter.js +104 -0
  206. package/lib/lowcode/view/lc-components/Table/index.js +255 -35
  207. package/lib/lowcode/view/lc-components/Table/meta.json +179 -32
  208. package/lib/lowcode/view/lc-components/Tabs/meta.json +0 -1
  209. package/lib/lowcode/view/lc-components/Text/meta.json +1 -1
  210. package/lib/lowcode/view/lc-components/Tree/FunctionDesign.js +49 -3
  211. package/lib/lowcode/view/lc-components/Tree/index.js +77 -6
  212. package/lib/lowcode/view/lc-components/Tree/index.less +2 -0
  213. package/lib/lowcode/view/lc-components/Tree/meta.json +97 -55
  214. package/lib/lowcode/view/lc-components/Wrapper.js +2 -2
  215. package/package.json +10 -5
  216. package/es/lowcode/painter/panel-section/TableActions.js +0 -19
  217. package/lib/lowcode/painter/panel-section/TableActions.js +0 -26
@@ -0,0 +1,130 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
5
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
+ var _excluded = ["children", "display", "action", "className", "onClick"],
7
+ _excluded2 = ["max", "display", "todoList", "className", "moreText", "doAction"];
8
+ import React, { Fragment } from 'react';
9
+ import { useCreation, useMemoizedFn } from 'ahooks';
10
+ import { Modal, recheck } from '@luck-design-biz/base';
11
+ import { Button, Menu, Dropdown, Icon, Divider } from 'luck-design/antd';
12
+ import classNames from 'classnames';
13
+ import { reduce } from 'lodash';
14
+ import { getResources } from "../../helper/ldComBuild";
15
+ import styles from "./index.less";
16
+ var DisplayComp = function DisplayComp(_ref) {
17
+ var children = _ref.children,
18
+ display = _ref.display,
19
+ action = _ref.action,
20
+ className = _ref.className,
21
+ onClick = _ref.onClick,
22
+ props = _objectWithoutProperties(_ref, _excluded);
23
+ if (display === 'text') {
24
+ return /*#__PURE__*/React.createElement("span", _extends({}, props, {
25
+ className: classNames(styles[action.riskLevel], _defineProperty(_defineProperty({}, className, !!className), styles.disabled, action.serialEffect === 'disable')),
26
+ onClick: onClick
27
+ }), children);
28
+ }
29
+ return /*#__PURE__*/React.createElement(Button, _extends({}, props, {
30
+ disabled: action.serialEffect === 'disable',
31
+ className: classNames(styles[action.riskLevel], _defineProperty({}, className, !!className)),
32
+ onClick: onClick
33
+ }), children);
34
+ };
35
+ var LDActions = function LDActions(_ref2) {
36
+ var max = _ref2.max,
37
+ display = _ref2.display,
38
+ todoList = _ref2.todoList,
39
+ className = _ref2.className,
40
+ _ref2$moreText = _ref2.moreText,
41
+ moreText = _ref2$moreText === void 0 ? '更多行为' : _ref2$moreText,
42
+ doAction = _ref2.doAction,
43
+ props = _objectWithoutProperties(_ref2, _excluded2);
44
+ var resources = getResources();
45
+ var handleClick = useMemoizedFn(function (action) {
46
+ if (action.riskLevel === 'danger') {
47
+ Modal.confirm({
48
+ title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
49
+ onOk: function onOk() {
50
+ return doAction(action);
51
+ }
52
+ });
53
+ } else if (action.riskLevel === 'destroy') {
54
+ recheck({
55
+ title: "\u786E\u8BA4\u6267\u884C".concat(action.name, "\u884C\u4E3A\u64CD\u4F5C\u5417\uFF1F"),
56
+ checkWords: "\u6267\u884C".concat(action.name),
57
+ onOk: function onOk() {
58
+ return doAction(action);
59
+ }
60
+ });
61
+ } else {
62
+ doAction(action);
63
+ }
64
+ });
65
+ var actionMap = useCreation(function () {
66
+ return reduce(todoList, function (ret, action, index) {
67
+ ret[action.serial] = _objectSpread(_objectSpread({}, action), {}, {
68
+ serialValue: Math.pow(2, index)
69
+ });
70
+ return ret;
71
+ }, {});
72
+ }, [todoList]);
73
+ var mySerialsValue = useCreation(function () {
74
+ return reduce(resources, function (ret, resKey) {
75
+ var _actionMap$resKey;
76
+ ret |= ((_actionMap$resKey = actionMap[resKey]) === null || _actionMap$resKey === void 0 ? void 0 : _actionMap$resKey.serialValue) || 0;
77
+ return ret;
78
+ }, 0);
79
+ }, [resources, actionMap]);
80
+ var _useCreation = useCreation(function () {
81
+ var approvedActions = reduce(actionMap, function (ret, action) {
82
+ if (mySerialsValue & action.serialValue) {
83
+ ret.push(action);
84
+ } else if (action.serialEffect === 'disable') {
85
+ ret.push(action);
86
+ }
87
+ return ret;
88
+ }, []);
89
+ var _length = approvedActions.length;
90
+ var _permanent = approvedActions.splice(0, max >= _length ? _length : max - 1);
91
+ return [_permanent, approvedActions];
92
+ }, [max, mySerialsValue, actionMap]),
93
+ _useCreation2 = _slicedToArray(_useCreation, 2),
94
+ permanent = _useCreation2[0],
95
+ more = _useCreation2[1];
96
+ return /*#__PURE__*/React.createElement("div", _extends({
97
+ className: classNames(styles.ldActions, _defineProperty({}, className, !!className))
98
+ }, props), permanent.map(function (action, index) {
99
+ return /*#__PURE__*/React.createElement(Fragment, {
100
+ key: action.id
101
+ }, /*#__PURE__*/React.createElement(DisplayComp, {
102
+ display: display,
103
+ action: action,
104
+ onClick: function onClick() {
105
+ return handleClick(action);
106
+ }
107
+ }, action.name), display === 'text' && index < permanent.length - (more.length ? 0 : 1) && /*#__PURE__*/React.createElement(Divider, {
108
+ type: "vertical"
109
+ }));
110
+ }), !!more.length && /*#__PURE__*/React.createElement(Dropdown, {
111
+ overlay: /*#__PURE__*/React.createElement(Menu, {
112
+ onClick: function onClick(e) {
113
+ return handleClick(e.item.props.action);
114
+ }
115
+ }, more.map(function (action) {
116
+ return /*#__PURE__*/React.createElement(Menu.Item, {
117
+ key: action.id,
118
+ action: action
119
+ }, action.name);
120
+ }))
121
+ }, /*#__PURE__*/React.createElement(DisplayComp, {
122
+ display: display,
123
+ action: {
124
+ riskLevel: 'default'
125
+ }
126
+ }, moreText, display !== 'text' && /*#__PURE__*/React.createElement(Icon, {
127
+ type: "down"
128
+ }))));
129
+ };
130
+ export default LDActions;
@@ -0,0 +1,48 @@
1
+ .ldActions {
2
+
3
+ button:not(:last-child) {
4
+ margin-right: 8px;
5
+ }
6
+ span {
7
+ cursor: pointer;
8
+ }
9
+
10
+ button.default {
11
+ background-color: white;
12
+ }
13
+ span.default {
14
+ color: #262626;
15
+ }
16
+
17
+ button.primary {
18
+ background-color: var(--luck-color-primary);
19
+ border-color: var(--luck-color-primary);
20
+ color: white;
21
+ }
22
+ span.primary {
23
+ color: var(--luck-color-primary);
24
+ }
25
+
26
+ button.danger {
27
+ background-color: #ff4d4f;
28
+ border-color: #ff4d4f;
29
+ color: white;
30
+ }
31
+ span.danger {
32
+ color: #ff4d4f;
33
+ }
34
+
35
+ button.destroy {
36
+ background-color: #820014;
37
+ border-color: #820014;
38
+ color: white;
39
+ }
40
+ span.destroy {
41
+ color: #820014;
42
+ }
43
+
44
+ span.disabled {
45
+ color: #bfbfbf;
46
+ cursor: not-allowed;
47
+ }
48
+ }
@@ -196,8 +196,8 @@ var LdFormList = function LdFormList(_ref) {
196
196
  mainDataSetKey: mainDataSetKey
197
197
  }, function (success, mainKey, res) {
198
198
  setSubmitLoading(false);
199
- var mainFormData = res.detail[res.list[0]];
200
199
  if (success) {
200
+ var mainFormData = res.detail[res.list[0]];
201
201
  if (afterSubmit) {
202
202
  afterSubmit(success, mainKey, res);
203
203
  } else {
@@ -6,7 +6,7 @@ var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "na
6
6
  _excluded2 = ["ldId", "moduleCode", "suppressInit", "overModel", "afterQuery", "isTreeGrid"];
7
7
  import React, { forwardRef, useImperativeHandle, useRef, useEffect } from 'react';
8
8
  import { getDvaApp } from 'umi';
9
- import { transform, includes, keyBy, union, keys, isNil } from 'lodash';
9
+ import { transform, includes, keyBy, union, keys, isNil, isFunction } from 'lodash';
10
10
  import { useCreation } from 'ahooks';
11
11
  import PropTypes from 'prop-types';
12
12
  import { build } from '@luck-design-biz/base/Component';
@@ -88,9 +88,15 @@ var LdGrid = function LdGrid(_ref) {
88
88
  * columnsRewrite 覆盖模块管理配置,是否展示以模块管理配置为主,自己可以用hide来隐藏某字段
89
89
  */
90
90
  var _columns = useCreation(function () {
91
- if (columnsReset) return columnsReset;
91
+ if (columnsReset) {
92
+ if (isFunction) {
93
+ return columnsReset(columns);
94
+ }
95
+ return columnsReset;
96
+ }
97
+ var _columnsRewrite = isFunction(columnsRewrite) ? columnsRewrite(columns) : columnsRewrite;
92
98
  var defaultColumns = keyBy(columns, 'aliaName');
93
- var customColumns = keyBy(columnsRewrite, 'field');
99
+ var customColumns = keyBy(_columnsRewrite, 'field');
94
100
  var mergeFields = union(keys(defaultColumns), keys(customColumns));
95
101
  return transform(mergeFields, function (result, field) {
96
102
  var _customColumns$field;
@@ -3,9 +3,9 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
3
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
4
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
5
5
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
6
- var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat"],
6
+ var _excluded = ["columns", "resources", "actions", "doAction", "wrapperRef", "ldId", "dataSetKey", "defaultParmas", "moduleCode", "readOnly", "title", "rowKey", "treeNodeTitle", "unselectableNodes", "rightMenus", "defaultExpandDeep", "draggable", "onDrop", "className", "treeClassName", "rootAdd", "suppressInit", "afterQuery", "afterInit", "isTree", "service", "dataToTreeFormat", "boxRef", "doubleClick", "onNodeDoubleClick", "width", "height"],
7
7
  _excluded2 = ["onClick"];
8
- import React, { useState, useRef, useImperativeHandle, forwardRef } from 'react';
8
+ import React, { useState, useRef, useImperativeHandle, forwardRef, useLayoutEffect } from 'react';
9
9
  import { isFunction, isNumber, transform, includes, remove, cloneDeep, keys } from 'lodash';
10
10
  import { useRequest, useMemoizedFn, useCreation } from 'ahooks';
11
11
  import PropTypes from 'prop-types';
@@ -45,6 +45,11 @@ var LdTree = function LdTree(_ref) {
45
45
  isTree = _ref.isTree,
46
46
  service = _ref.service,
47
47
  dataToTreeFormat = _ref.dataToTreeFormat,
48
+ boxRef = _ref.boxRef,
49
+ doubleClick = _ref.doubleClick,
50
+ onNodeDoubleClick = _ref.onNodeDoubleClick,
51
+ width = _ref.width,
52
+ height = _ref.height,
48
53
  props = _objectWithoutProperties(_ref, _excluded);
49
54
  if (!includes(isTree, dataSetKey)) return formatMessage({
50
55
  id: 'luckda.ldTree.notTres',
@@ -107,6 +112,11 @@ var LdTree = function LdTree(_ref) {
107
112
  }
108
113
  });
109
114
  });
115
+ useLayoutEffect(function () {
116
+ run(_objectSpread(_objectSpread(_objectSpread({}, params[0]), defaultParams[0]), {}, {
117
+ datasetCode: dataSetKey
118
+ }));
119
+ }, [dataSetKey]);
110
120
  var handleMenuClick = function handleMenuClick(menu, data) {
111
121
  var onClick = menu.onClick,
112
122
  other = _objectWithoutProperties(menu, _excluded2);
@@ -139,15 +149,27 @@ var LdTree = function LdTree(_ref) {
139
149
  type: "more"
140
150
  }));
141
151
  };
152
+ var handleNodeDoubleClick = useMemoizedFn(function (e) {
153
+ var switcher = e.currentTarget.closest('li').querySelector('.ant-tree-switcher');
154
+ switcher.click();
155
+ });
156
+ var handleDoubleClick = useMemoizedFn(function (e, rowData) {
157
+ if (onNodeDoubleClick) onNodeDoubleClick(e, rowData, function () {
158
+ return handleNodeDoubleClick(e);
159
+ });else handleNodeDoubleClick(e);
160
+ });
142
161
  var renderTitleNode = function renderTitleNode(data, unSelectable) {
143
162
  var nodeTitle = isFunction(treeNodeTitle) ? treeNodeTitle(data) : data[treeNodeTitle];
144
163
  return /*#__PURE__*/React.createElement("div", {
145
164
  className: styles.nodeTitle,
146
- key: data[rowKey]
165
+ key: data[rowKey],
166
+ onDoubleClick: function onDoubleClick(e) {
167
+ return doubleClick && handleDoubleClick(e, data);
168
+ }
147
169
  }, /*#__PURE__*/React.createElement("div", {
148
170
  title: nodeTitle,
149
171
  className: classNames(_defineProperty({}, styles.nodeTitleDisabled, unSelectable))
150
- }, nodeTitle), !readOnly && renderRight(data));
172
+ }, nodeTitle, "11"), !readOnly && renderRight(data));
151
173
  };
152
174
  var renderTreeNodes = useMemoizedFn(function (data) {
153
175
  return data.map(function (item) {
@@ -185,7 +207,12 @@ var LdTree = function LdTree(_ref) {
185
207
  loading: loading,
186
208
  id: ldId,
187
209
  onAdd: onAdd,
188
- className: className
210
+ className: className,
211
+ ref: boxRef,
212
+ style: {
213
+ width: width,
214
+ height: height
215
+ }
189
216
  }, dataSource && /*#__PURE__*/React.createElement(LuckTree, _extends({
190
217
  blockNode: true,
191
218
  className: classNames(styles.tree, _defineProperty({}, className, !!treeClassName)),
@@ -3,6 +3,7 @@
3
3
  display: flex;
4
4
  align-items: center;
5
5
  width: 100%;
6
+ user-select: none;
6
7
 
7
8
  div {
8
9
  flex: 1;
@@ -10,9 +11,11 @@
10
11
  white-space: nowrap;
11
12
  text-overflow: ellipsis;
12
13
  }
14
+
13
15
  div.nodeTitleDisabled {
14
16
  color: var(--luck-text-color-disabled);
15
17
  }
18
+
16
19
  div.nodeTitleDisabled:hover {
17
20
  cursor: not-allowed;
18
21
  }
@@ -24,13 +27,15 @@
24
27
  }
25
28
  }
26
29
  }
30
+
27
31
  .classTreeOperates {
28
32
  :global(.ant-popover-inner-content) {
29
33
  padding: 0;
30
34
  }
35
+
31
36
  .rightMenu {
32
37
  display: block;
33
38
  padding: 4px 8px;
34
39
  color: var(--luck-text-color-);
35
40
  }
36
- }
41
+ }
package/es/index.js CHANGED
@@ -6,5 +6,6 @@ export { default as buildLdAutoForm } from "./components/LdAutoForm";
6
6
  export { default as buildLdGridForm } from "./components/LdGridForm";
7
7
  export { default as LdInfoPanel } from "./components/LdInfoPanel";
8
8
  export { default as LdCard } from "./components/LdCard";
9
+ export { default as LDActions } from "./components/LDActions";
9
10
  export { default as LdRuntimeCom } from "./components/LdRuntimeCom";
10
11
  export * from "./components/LdCom";
@@ -0,0 +1,151 @@
1
+ export default {
2
+ "luckda.lowcode.painter.panel.attrs": "属性",
3
+ "luckda.lowcode.painter.panel.styles": "样式",
4
+ "luckda.lowcode.painter.panel.advance": "高级",
5
+ "luckda.lowcode.painter.panel.empty": "请在左侧画布选中节点",
6
+ "luckda.lowcode.page": "页面",
7
+ "luckda.lowcode.modal": "模态视图层",
8
+ "luckda.lowcode.painter.I18n.search": "搜索文案",
9
+ "luckda.lowcode.painter.I18n.add": "新增文案",
10
+ "luckda.lowcode.painter.components.search": "搜索组件",
11
+ "ccm.dev.page.set.components.base": "基础组件",
12
+ "ccm.dev.page.set.components.dataset": "数据集字段",
13
+ "luckda.lowcode.painter.panel-section.width-height": "请输入数值",
14
+ "luckda.lowcode.painter.edit": "编辑",
15
+ "luckda.lowcode.painter.panel-section.tableTopFilter.label": "名称",
16
+ "luckda.lowcode.painter.panel-section.tableTopFilter.label.placeholder": "请输入过滤项名称",
17
+ "luckda.lowcode.painter.panel-section.tableTopFilter.value": "值",
18
+ "luckda.lowcode.painter.panel-section.tableTopFilter.value.placeholder": "请输入过滤项值",
19
+ "luckda.lowcode.painter.panel-section.tableTopFilter.field": "字段",
20
+ "luckda.lowcode.painter.panel-section.tableTopFilter.field.placeholder": "请选择过滤字段",
21
+ "luckda.lowcode.painter.delete": "删除",
22
+ "luckda.lowcode.painter.panel-section.tableTopFilter.nil": "关闭过滤器",
23
+ "luckda.lowcode.painter.panel-section.tableTopFilter.dict": "数据字典",
24
+ "luckda.lowcode.painter.panel-section.tableTopFilter.dict.placeholder": "请输入接口地址",
25
+ "luckda.lowcode.painter.panel-section.tableTopFilter.custom": "自定义项",
26
+ "luckda.lowcode.painter.panel-section.tableTopFilter.add": "添加过滤项",
27
+ "luckda.lowcode.painter.panel-section.tableTopFilter.customApi": "自定义接口",
28
+ "luckda.lowcode.painter.panel-section.tableTopFilter.customApi.tip": "接口返回数据格式必须是: {mainInfo:{options:[{value: string,label: stirng}], field: string}}",
29
+ "luckda.lowcode.painter.panel-section.tabsitems.edit": "添加",
30
+ "luckda.lowcode.painter.panel-section.tabsitems.delete": "删除",
31
+ "luckda.lowcode.painter.panel-section.tabsitems.editor.tabname": "名称",
32
+ "luckda.lowcode.painter.panel-section.tabsitems.editor.tabname.placeholder": "请输入标签名称",
33
+ "luckda.lowcode.painter.panel-section.tabsitems.editor.id": "编号",
34
+ "luckda.lowcode.painter.panel-section.tabsitems.editor.reskey": "控制效果",
35
+ "luckda.lowcode.painter.panel-section.tabsitems.editor.reskey.placeholder": "请输入资源串",
36
+ "luckda.lowcode.painter.panel-section.Layoutratio.err": "必须是数字或者数字加:号的组合,且数字之和必须等于12",
37
+ "luckda.lowcode.painter.panel-section.Layoutratio.label": "列比例",
38
+ "luckda.lowcode.painter.panel-section.Layoutratio.placeholder": "请输入列比例",
39
+ "luckda.lowcode.painter.panel-section.style-panel.sourceedit": "源码编辑",
40
+ "luckda.lowcode.painter.import": "导入",
41
+ "luckda.lowcode.painter.panel-section.impexp.impUrl.placeholder": "请输入模版ID或自定义接口",
42
+ "luckda.lowcode.painter.export": "导出",
43
+ "luckda.lowcode.painter.panel-section.impexp.expUrl.placeholder": "请输入自定义接口",
44
+ "luckda.lowcode.painter.panel-section.style-panel.box-shadow": "阴影",
45
+ "luckda.lowcode.painter.panel-section.style-panel.box-shadow.big": "大",
46
+ "luckda.lowcode.painter.panel-section.style-panel.box-shadow.middle": "中",
47
+ "luckda.lowcode.painter.panel-section.style-panel.box-shadow.small": "小",
48
+ "luckda.lowcode.painter.panel-section.style-panel.box-shadow.none": "无",
49
+ "luckda.lowcode.painter.panel-section.style-panel.box-shadow.custom": "自定义",
50
+ "luckda.lowcode.painter.panel-section.style-panel.box-shadow.detail.color": "颜色",
51
+ "luckda.lowcode.painter.panel-section.style-panel.cursor": "鼠标手势",
52
+ "luckda.lowcode.painter.panel-section.style-panel.padding.top": "上边距",
53
+ "luckda.lowcode.painter.panel-section.style-panel.padding.right": "右边距",
54
+ "luckda.lowcode.painter.panel-section.style-panel.padding.down": "下边距",
55
+ "luckda.lowcode.painter.panel-section.style-panel.padding.left": "左边距",
56
+ "luckda.lowcode.painter.panel-section.style-panel.opacity": "透明度",
57
+ "luckda.lowcode.painter.panel-section.style-panel.opacity.ph": "透明度",
58
+ "luckda.lowcode.painter.panel-section.style-panel.margin.top": "上间距",
59
+ "luckda.lowcode.painter.panel-section.style-panel.margin.right": "右间距",
60
+ "luckda.lowcode.painter.panel-section.style-panel.margin.down": "下间距",
61
+ "luckda.lowcode.painter.panel-section.style-panel.margin.left": "左间距",
62
+ "luckda.lowcode.painter.panel-section.style-panel.group-name": "样式设置",
63
+ "luckda.lowcode.painter.panel-section.style-panel.width": "请输入宽高度",
64
+ "luckda.lowcode.painter.panel-section.style-panel.display": "显示",
65
+ "luckda.lowcode.painter.panel-section.style-panel.margin.superbig": "超大(24px)",
66
+ "luckda.lowcode.painter.panel-section.style-panel.margin.big": "大(20px)",
67
+ "luckda.lowcode.painter.panel-section.style-panel.margin.middle": "中(16px)",
68
+ "luckda.lowcode.painter.panel-section.style-panel.margin.small": "小(12px)",
69
+ "luckda.lowcode.painter.panel-section.style-panel.margin.supersmall": "超小(8px)",
70
+ "luckda.lowcode.painter.panel-section.style-panel.margin.none": "无(0px)",
71
+ "luckda.lowcode.painter.panel-section.style-panel.margin.default": "默认",
72
+ "luckda.lowcode.painter.panel-section.style-panel.font.weight": "字重",
73
+ "luckda.lowcode.painter.panel-section.style-panel.font.style": "样式",
74
+ "luckda.lowcode.painter.panel-section.style-panel.font.color": "字体颜色",
75
+ "luckda.lowcode.painter.panel-section.style-panel.font.size": "字体大小",
76
+ "luckda.lowcode.painter.panel-section.style-panel.font.size.ph": "字体大小",
77
+ "luckda.lowcode.painter.panel-section.style-panel.font.line-height.ph": "行高",
78
+ "luckda.lowcode.painter.panel-section.style-panel.font.align": "对齐",
79
+ "luckda.lowcode.painter.panel-section.style-panel.font.align.left": "左对齐",
80
+ "luckda.lowcode.painter.panel-section.style-panel.font.align.center": "自适应",
81
+ "luckda.lowcode.painter.panel-section.style-panel.font.style.none": "无",
82
+ "luckda.lowcode.painter.panel-section.style-panel.font.style.underline": "下划线",
83
+ "luckda.lowcode.painter.panel-section.style-panel.font.style.line-through": "中划线",
84
+ "luckda.lowcode.painter.panel-section.style-panel.font": "文字",
85
+ "luckda.lowcode.painter.panel-section.style-panel.font.h1": "一级标题",
86
+ "luckda.lowcode.painter.panel-section.style-panel.font.h2": "二级标题",
87
+ "luckda.lowcode.painter.panel-section.style-panel.font.h3": "三级标题",
88
+ "luckda.lowcode.painter.panel-section.style-panel.font.paragraph": "段落",
89
+ "luckda.lowcode.painter.panel-section.style-panel.font.default": "无",
90
+ "luckda.lowcode.painter.panel-section.style-panel.font.custom": "自定义",
91
+ "luckda.lowcode.painter.panel-section.style-panel.display.block": "块",
92
+ "luckda.lowcode.painter.panel-section.style-panel.display.inline-block": "行内块",
93
+ "luckda.lowcode.painter.panel-section.style-panel.display.inline": "行内",
94
+ "luckda.lowcode.painter.panel-section.style-panel.display.flex": "弹性",
95
+ "luckda.lowcode.painter.panel-section.style-panel.display.direct.row": "方向:横向",
96
+ "luckda.lowcode.painter.panel-section.style-panel.display.direct.column": "方向:纵向反转",
97
+ "luckda.lowcode.painter.panel-section.style-panel.display.align-items.flex-start": "交叉轴:起始对齐",
98
+ "luckda.lowcode.painter.panel-section.style-panel.display.align-items.center": "交叉轴:居中",
99
+ "luckda.lowcode.painter.panel-section.style-panel.display.align-items.flex-end": "交叉轴:终点对齐",
100
+ "luckda.lowcode.painter.panel-section.style-panel.display.align-items.stretch": "交叉轴:拉伸",
101
+ "luckda.lowcode.painter.panel-section.style-panel.display.align-items.baseline": "交叉轴:基线",
102
+ "luckda.lowcode.painter.panel-section.style-panel.display.justify.flex-start": "水平轴:起始对齐",
103
+ "luckda.lowcode.painter.panel-section.style-panel.display.justify.center": "水平轴:居中对齐",
104
+ "luckda.lowcode.painter.panel-section.style-panel.display.justify.flex-end": "水平轴:结束对齐",
105
+ "luckda.lowcode.painter.panel-section.style-panel.display.justify.space-between": "水平轴:两端对齐",
106
+ "luckda.lowcode.painter.panel-section.style-panel.display.justify.space-around": "水平轴:均匀对齐,项目周围间隔相等",
107
+ "luckda.lowcode.painter.panel-section.style-panel.display.justify.space-evenly": "水平轴:均匀分布,所有项目与容器边缘的间隔相等",
108
+ "luckda.lowcode.painter.panel-section.style-panel.border-radius": " 圆角",
109
+ "luckda.lowcode.painter.panel-section.style-panel.border-radius.width": "半径",
110
+ "luckda.lowcode.painter.panel-section.style-panel.border-radius.width.ph": "半径",
111
+ "luckda.lowcode.painter.panel-section.style-panel.border": "边框",
112
+ "luckda.lowcode.painter.panel-section.style-panel.border.style": "边框",
113
+ "luckda.lowcode.painter.panel-section.style-panel.border.style.none": "无",
114
+ "luckda.lowcode.painter.panel-section.style-panel.border.style.solid": "实线条",
115
+ "luckda.lowcode.painter.panel-section.style-panel.border.style.dotted": "点线",
116
+ "luckda.lowcode.painter.panel-section.style-panel.border.style.dashed": "虚线",
117
+ "luckda.lowcode.painter.panel-section.style-panel.border.width": "线宽",
118
+ "luckda.lowcode.painter.panel-section.style-panel.border.width.ph": "线宽",
119
+ "luckda.lowcode.painter.panel-section.style-panel.border.color": "颜色",
120
+ "luckda.lowcode.painter.panel-section.style-panel.background": "背景",
121
+ "luckda.lowcode.painter.panel-section.actionsEditor.button": "按钮",
122
+ "luckda.lowcode.painter.panel-section.actionsEditor.text": "文本",
123
+ "luckda.lowcode.painter.panel-section.actionsEditor.display": "展现形式",
124
+ "luckda.lowcode.painter.panel-section.actionsEditor.max": "最大显示数",
125
+ "luckda.lowcode.painter.panel-section.actionsEditor.moreText": "更多显示文字",
126
+ "luckda.lowcode.painter.panel-section.actionsEditor.add": "添加操作",
127
+ "luckda.lowcode.painter.panel-section.actionEditor.hidden": "隐藏",
128
+ "luckda.lowcode.painter.panel-section.actionEditor.disable": "禁用",
129
+ "luckda.lowcode.painter.panel-section.actionEditor.default": "一般",
130
+ "luckda.lowcode.painter.panel-section.actionEditor.primary": "重要",
131
+ "luckda.lowcode.painter.panel-section.actionEditor.danger": "危险",
132
+ "luckda.lowcode.painter.panel-section.actionEditor.destroy": "毁灭",
133
+ "luckda.lowcode.painter.panel-section.actionEditor.name": "名称",
134
+ "luckda.lowcode.painter.panel-section.actionEditor.name.placeholder": "请输入行为名称",
135
+ "luckda.lowcode.painter.panel-section.actionEditor.serial": "资源串",
136
+ "luckda.lowcode.painter.panel-section.actionEditor.serial.placeholder": "请输入行为名称",
137
+ "luckda.lowcode.painter.panel-section.actionEditor.serialEffect": "风险等级",
138
+ "luckda.lowcode.painter.panel-section.actionEditor.actionPool": "行为池",
139
+ "luckda.lowcode.painter.coder": "编码器",
140
+ "luckda.lowcode.painter.panel-section.components.listeditor.add": "添加一项",
141
+ "luckda.lowcode.painter.panel-section.field-selector.placeholder": "请选择字段",
142
+ "luckda.lowcode.painter.advancePanel.events": "事件",
143
+ "luckda.lowcode.painter.advancePanel.addEventAction": "添加事件动作",
144
+ "luckda.lowcode.painter.actionBindModal.actions": "页面行为",
145
+ "luckda.lowcode.painter.actionBindModal.trigger": "触发器",
146
+ "luckda.lowcode.painter.actionBindModal.code": "自定义动作",
147
+ "luckda.lowcode.painter.actionBindModal.coding": "动作编写",
148
+ "luckda.lowcode.painter.actionBindModal.bind": "绑定动作",
149
+ "luckda.lowcode.painter.actionBindModal.search": "搜索",
150
+ "luckda.lowcode.painter.components.fullscreen.tip": "全屏"
151
+ };
@@ -75,7 +75,7 @@ function _fetchPageData() {
75
75
  groupName: '布局',
76
76
  desc: '布局容器是一种提供列比例、列间距、行间距和样式等配置选项的元素,用于创建灵活的页面布局。它使用户能够轻松组织和排列组件,并实现各种复杂的布局需求。',
77
77
  order: 1,
78
- style: {},
78
+ css: {},
79
79
  columnRatio: '12:3:9',
80
80
  columnSpacing: 16,
81
81
  lineSpacing: 16,
@@ -91,9 +91,9 @@ function _fetchPageData() {
91
91
  group: 'container',
92
92
  groupName: '布局',
93
93
  order: 3,
94
+ css: 'height: auto; background-color: #5cdbd3',
94
95
  style: {
95
- gridColumn: 'span 12',
96
- height: 'auto'
96
+ gridColumn: 'span 12'
97
97
  },
98
98
  id: 'box_xFuKLKBI'
99
99
  },
@@ -130,9 +130,9 @@ function _fetchPageData() {
130
130
  groupName: '布局',
131
131
  order: 3,
132
132
  style: {
133
- gridColumn: 'span 3',
134
- height: '60px'
133
+ gridColumn: 'span 3'
135
134
  },
135
+ css: 'height: 60px; background-color: #fff',
136
136
  id: 'box_jeVHiHZV'
137
137
  },
138
138
  children: ['tree_hh2b87qs'],
@@ -142,7 +142,10 @@ function _fetchPageData() {
142
142
  parentId: 'box_diam9dis',
143
143
  group: 'advance',
144
144
  component: 'Tree',
145
- name: ''
145
+ dataset: 'dsWmsStorageLocation',
146
+ name: '树',
147
+ defaultExpandDeep: '0',
148
+ doubleClick: true
146
149
  }
147
150
  }
148
151
  },
@@ -156,9 +159,9 @@ function _fetchPageData() {
156
159
  groupName: '布局',
157
160
  order: 3,
158
161
  style: {
159
- gridColumn: 'span 9',
160
- height: '360px'
162
+ gridColumn: 'span 9'
161
163
  },
164
+ css: 'height: 360px; background-color: #fff',
162
165
  id: 'box_5KLx4rGb'
163
166
  },
164
167
  children: ['table_diam9dis'],
@@ -175,7 +178,11 @@ function _fetchPageData() {
175
178
  bordered: false,
176
179
  zebra: '#e8e8e8',
177
180
  autoLoad: true,
181
+ impexp: {
182
+ export: true
183
+ },
178
184
  readOnly: false,
185
+ renderIndex: true,
179
186
  pagination: true,
180
187
  pageSize: 5,
181
188
  showSizeChanger: true,
@@ -187,8 +194,9 @@ function _fetchPageData() {
187
194
  actions: {
188
195
  display: 'button',
189
196
  max: 2,
197
+ moreText: '操作',
190
198
  todoList: [{
191
- actionCode: 'console.log(1234)',
199
+ actionCode: 'function todo(ctx) {\nconsole.log(111)\n}',
192
200
  actionPool: ['lucy'],
193
201
  id: 'h9ZZuLi6',
194
202
  name: '领用',
@@ -196,7 +204,7 @@ function _fetchPageData() {
196
204
  serial: 'read',
197
205
  serialEffect: 'hidden'
198
206
  }, {
199
- actionCode: 'console.log(5678)',
207
+ actionCode: 'function todo(ctx) {\nconsole.log(222)\n}',
200
208
  actionPool: ['lucy'],
201
209
  id: 'h9ZZuLi4',
202
210
  name: '作废',
@@ -204,7 +212,7 @@ function _fetchPageData() {
204
212
  serial: 'read',
205
213
  serialEffect: 'hidden'
206
214
  }, {
207
- actionCode: 'console.log(9999)',
215
+ actionCode: 'function todo(ctx) {\nconsole.log(333)\n}',
208
216
  actionPool: ['lucy'],
209
217
  id: 'h9ZZuLi2',
210
218
  name: '上报',
@@ -212,7 +220,58 @@ function _fetchPageData() {
212
220
  serial: 'read',
213
221
  serialEffect: 'hidden'
214
222
  }]
215
- }
223
+ },
224
+ topActionGroup: {
225
+ display: 'button',
226
+ max: 2,
227
+ moreText: '更多行为',
228
+ todoList: [{
229
+ actionCode: 'function todo(ctx) {\nconsole.log(1234, ctx)\n}',
230
+ actionPool: ['lucy', 'sin2k98j'],
231
+ id: 'ms8e2ik2',
232
+ name: '新建',
233
+ riskLevel: 'danger',
234
+ serial: 'add',
235
+ serialEffect: 'hidden'
236
+ }, {
237
+ actionCode: 'function todo(ctx) {\nconsole.log(5678, ctx)\n}',
238
+ actionPool: ['lucy'],
239
+ id: 'z0op2ijh',
240
+ name: '作废',
241
+ riskLevel: 'destroy',
242
+ serial: 'delete',
243
+ serialEffect: 'hidden'
244
+ }, {
245
+ actionCode: 'function todo(ctx) {\nconsole.log(9876, ctx.pageData)\n}',
246
+ actionPool: ['lucy'],
247
+ id: 'bndty2hn',
248
+ name: '查阅',
249
+ riskLevel: 'default',
250
+ serial: 'read',
251
+ serialEffect: 'hidden'
252
+ }, {
253
+ actionCode: 'function todo(ctx) {\nconsole.log(9999)\n}',
254
+ actionPool: ['lucy'],
255
+ id: 'zsio2a13',
256
+ name: '导入',
257
+ riskLevel: 'default',
258
+ serial: 'import',
259
+ serialEffect: 'disable'
260
+ }, {
261
+ actionCode: 'function todo(ctx) {\nconsole.log(4444)\n}',
262
+ actionPool: ['lucy'],
263
+ id: 'nnhgww00',
264
+ name: '上报',
265
+ riskLevel: 'default',
266
+ serial: 'update',
267
+ serialEffect: 'hidden'
268
+ }]
269
+ },
270
+ rowSelection: true,
271
+ suppressRowSelectionPagination: false,
272
+ rowSelectionMode: 'multiple',
273
+ defaultRowSelectedCode: "function getRowDefaultSelected(data, node, ctx) { \n return data.classify_name === '学习用品'; \n}",
274
+ rowSelectableCode: "function getRowSelectable(data, node, ctx) { \n return data.classify_name !== '专用物资(运总)'; \n}"
216
275
  }
217
276
  }
218
277
  }
@@ -9,4 +9,6 @@ export var CELL_KEY = {
9
9
  PAGE_HEADER: 'page_header',
10
10
  PAGE_CONTENT: 'page_content',
11
11
  PAGE_FOOTER: 'page_footer'
12
- };
12
+ };
13
+ export var CELL_KEY_LIST = Object.values(CELL_KEY);
14
+ export var CONTAINER_UNIT = 'Box';