@luck-design-biz/luckda 1.0.1-13 → 1.0.1-15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/LDActions/index.less +3 -1
- package/es/components/LdCard/index.js +15 -8
- package/es/components/LdTree/index.js +14 -8
- package/es/helper/ldBuilder.js +1 -1
- package/es/lowcode/engine/meta/cardlist.props.json +5 -5
- package/es/lowcode/engine/meta/iframe.props.json +1 -2
- package/es/lowcode/engine/meta/image.props.json +1 -1
- package/es/lowcode/painter/DesignToolbar.js +1 -1
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/es/lowcode/painter/style/action-bind-modal.less +5 -3
- package/es/lowcode/painter/style/design.less +10 -7
- package/es/lowcode/painter/style/list-editor.less +5 -3
- package/es/lowcode/painter/style/number-input.less +3 -1
- package/es/lowcode/painter/style/outline.less +3 -1
- package/es/lowcode/painter/style/panel-attrs.less +7 -3
- package/es/lowcode/painter/style/panel.less +9 -7
- package/es/lowcode/painter/style/radio.less +1 -1
- package/es/lowcode/painter/style/ribbon.less +4 -2
- package/es/lowcode/view/lc-components/CardList/index.js +16 -11
- package/es/lowcode/view/lc-components/CardList/meta.json +5 -5
- package/es/lowcode/view/lc-components/GroupTree/index.js +23 -7
- package/es/lowcode/view/lc-components/Iframe/index.js +2 -3
- package/es/lowcode/view/lc-components/Iframe/meta.json +1 -2
- package/es/lowcode/view/lc-components/Image/index.js +23 -3
- package/es/lowcode/view/lc-components/Image/meta.json +1 -1
- package/es/lowcode/view/lc-components/Link/index.js +20 -2
- package/es/lowcode/view/lc-components/Table/index.js +1 -3
- package/es/lowcode/view/lc-components/Tree/index.js +18 -11
- package/lib/components/LDActions/index.less +3 -1
- package/lib/components/LdCard/index.js +15 -8
- package/lib/components/LdTree/index.js +14 -8
- package/lib/helper/ldBuilder.js +2 -2
- package/lib/lowcode/engine/meta/cardlist.props.json +5 -5
- package/lib/lowcode/engine/meta/iframe.props.json +1 -2
- package/lib/lowcode/engine/meta/image.props.json +1 -1
- package/lib/lowcode/painter/DesignToolbar.js +1 -1
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/lib/lowcode/painter/style/action-bind-modal.less +5 -3
- package/lib/lowcode/painter/style/design.less +10 -7
- package/lib/lowcode/painter/style/list-editor.less +5 -3
- package/lib/lowcode/painter/style/number-input.less +3 -1
- package/lib/lowcode/painter/style/outline.less +3 -1
- package/lib/lowcode/painter/style/panel-attrs.less +7 -3
- package/lib/lowcode/painter/style/panel.less +9 -7
- package/lib/lowcode/painter/style/radio.less +1 -1
- package/lib/lowcode/painter/style/ribbon.less +4 -2
- package/lib/lowcode/view/lc-components/CardList/index.js +16 -11
- package/lib/lowcode/view/lc-components/CardList/meta.json +5 -5
- package/lib/lowcode/view/lc-components/GroupTree/index.js +21 -5
- package/lib/lowcode/view/lc-components/Iframe/index.js +0 -1
- package/lib/lowcode/view/lc-components/Iframe/meta.json +1 -2
- package/lib/lowcode/view/lc-components/Image/index.js +22 -2
- package/lib/lowcode/view/lc-components/Image/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Link/index.js +19 -1
- package/lib/lowcode/view/lc-components/Table/index.js +1 -3
- package/lib/lowcode/view/lc-components/Tree/index.js +17 -10
- package/package.json +2 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '~@luck-helper/ui-design/es/style/themes/default.less';
|
|
2
|
+
|
|
1
3
|
@spanDefault: #262626;
|
|
2
4
|
@spanPrimary: var(--ant-primary-color);
|
|
3
5
|
@spanDanger: #ff4d4f;
|
|
@@ -16,7 +18,7 @@
|
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
button.default {
|
|
19
|
-
background-color:
|
|
21
|
+
background-color: @component-background;
|
|
20
22
|
}
|
|
21
23
|
span.default {
|
|
22
24
|
color: @spanDefault;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -6,6 +7,7 @@ var _excluded = ["columns", "resources", "actions", "doAction", "afterInit", "na
|
|
|
6
7
|
_excluded2 = ["ldId", "moduleCode", "suppressInit", "overModel", "afterQuery"];
|
|
7
8
|
import React, { forwardRef, useImperativeHandle, useRef, useEffect, useLayoutEffect } from 'react';
|
|
8
9
|
import { getDvaApp } from 'umi';
|
|
10
|
+
import classNames from 'classnames';
|
|
9
11
|
import PropTypes from 'prop-types';
|
|
10
12
|
import { Icon, Tooltip } from 'luck-design/antd';
|
|
11
13
|
import { ResultSet, PermissionUtil } from 'luck-design';
|
|
@@ -174,9 +176,14 @@ var LdCard = function LdCard(_ref2) {
|
|
|
174
176
|
});
|
|
175
177
|
}
|
|
176
178
|
});
|
|
179
|
+
var _ref3 = wrapperProps || {},
|
|
180
|
+
className = _ref3.className,
|
|
181
|
+
_wrapperProps = _ref3._wrapperProps;
|
|
177
182
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
178
183
|
ref: wrapper
|
|
179
|
-
},
|
|
184
|
+
}, _wrapperProps, {
|
|
185
|
+
className: classNames('luck-card-list', _defineProperty({}, className, !!className))
|
|
186
|
+
}), difference(Object.keys(params), resultSet.invisibleSet || []).length > 0 && /*#__PURE__*/React.createElement(ResultSet, _extends({
|
|
180
187
|
set: params,
|
|
181
188
|
onQuery: onQuery
|
|
182
189
|
}, resultSet, {
|
|
@@ -201,13 +208,13 @@ var ForwardLdCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
201
208
|
wrapperRef: ref
|
|
202
209
|
}, props));
|
|
203
210
|
});
|
|
204
|
-
var LdIndex = function LdIndex(
|
|
205
|
-
var namespace =
|
|
206
|
-
moduleCode =
|
|
207
|
-
suppressInit =
|
|
208
|
-
overModel =
|
|
209
|
-
afterQuery =
|
|
210
|
-
props = _objectWithoutProperties(
|
|
211
|
+
var LdIndex = function LdIndex(_ref4) {
|
|
212
|
+
var namespace = _ref4.ldId,
|
|
213
|
+
moduleCode = _ref4.moduleCode,
|
|
214
|
+
suppressInit = _ref4.suppressInit,
|
|
215
|
+
overModel = _ref4.overModel,
|
|
216
|
+
afterQuery = _ref4.afterQuery,
|
|
217
|
+
props = _objectWithoutProperties(_ref4, _excluded2);
|
|
211
218
|
if (includes(props.isTree, props.dataSetKey)) return formatMessage({
|
|
212
219
|
id: 'luckda.ldCard.notTres',
|
|
213
220
|
label: '此数据集为树形数据集,请选择非树形数据集'
|
|
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
|
4
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
5
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
6
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
|
-
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", "
|
|
7
|
+
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", "wrapper", "wrapperProps", "doubleClickExpand", "onNodeDoubleClick", "width", "height", "treeNodeCheckable", "treeNodeDisableCheckbox", "treeNodeDisable", "treeNodeIcon", "asyncLoad", "parentKey", "onMount", "onUnmount", "onDataSetChange", "onTreeNodeRender", "onlyRoot"],
|
|
8
8
|
_excluded2 = ["0"],
|
|
9
9
|
_excluded3 = ["onClick"];
|
|
10
10
|
import React, { useState, useRef, useImperativeHandle, forwardRef, useLayoutEffect } from 'react';
|
|
@@ -16,7 +16,7 @@ import { Icon, Popover } from 'luck-design/antd';
|
|
|
16
16
|
import { LuckTree } from 'luck-design';
|
|
17
17
|
import { formatMessage, dataToTree, dragTreeData } from '@luck-design-biz/base/utils';
|
|
18
18
|
import { TreeBox } from '@luck-design-biz/base';
|
|
19
|
-
import ldBuilder from "../../helper/ldBuilder";
|
|
19
|
+
import ldBuilder, { ErrorWrapper } from "../../helper/ldBuilder";
|
|
20
20
|
import { behaviorCall } from "../../utils";
|
|
21
21
|
import styles from "./index.less";
|
|
22
22
|
var _window$appConfig$con = window.appConfig.constraintKeys,
|
|
@@ -59,7 +59,8 @@ var LdTree = function LdTree(_ref) {
|
|
|
59
59
|
isTree = _ref.isTree,
|
|
60
60
|
service = _ref.service,
|
|
61
61
|
dataToTreeFormat = _ref.dataToTreeFormat,
|
|
62
|
-
|
|
62
|
+
wrapper = _ref.wrapper,
|
|
63
|
+
wrapperProps = _ref.wrapperProps,
|
|
63
64
|
doubleClickExpand = _ref.doubleClickExpand,
|
|
64
65
|
onNodeDoubleClick = _ref.onNodeDoubleClick,
|
|
65
66
|
width = _ref.width,
|
|
@@ -76,10 +77,14 @@ var LdTree = function LdTree(_ref) {
|
|
|
76
77
|
onTreeNodeRender = _ref.onTreeNodeRender,
|
|
77
78
|
onlyRoot = _ref.onlyRoot,
|
|
78
79
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
79
|
-
if (!includes(isTree, dataSetKey)) return
|
|
80
|
+
if (!includes(isTree, dataSetKey)) return /*#__PURE__*/React.createElement(ErrorWrapper, {
|
|
81
|
+
ref: wrapper,
|
|
82
|
+
className: className,
|
|
83
|
+
style: props.style
|
|
84
|
+
}, formatMessage({
|
|
80
85
|
id: 'luckda.ldTree.notTrees',
|
|
81
86
|
label: '此数据集非树形数据集,请选择树形数据集'
|
|
82
|
-
});
|
|
87
|
+
}));
|
|
83
88
|
var _useState = useState(null),
|
|
84
89
|
_useState2 = _slicedToArray(_useState, 2),
|
|
85
90
|
dataSource = _useState2[0],
|
|
@@ -319,19 +324,20 @@ var LdTree = function LdTree(_ref) {
|
|
|
319
324
|
loadData: onLoadData
|
|
320
325
|
} : {};
|
|
321
326
|
}, []);
|
|
322
|
-
return /*#__PURE__*/React.createElement(TreeBox, {
|
|
327
|
+
return /*#__PURE__*/React.createElement(TreeBox, _extends({
|
|
323
328
|
suppressTitle: !title,
|
|
324
329
|
title: title,
|
|
325
330
|
loading: loading,
|
|
326
331
|
id: ldId,
|
|
327
332
|
onAdd: onAdd,
|
|
328
333
|
className: className,
|
|
329
|
-
ref:
|
|
334
|
+
ref: wrapper
|
|
335
|
+
}, wrapperProps, {
|
|
330
336
|
style: {
|
|
331
337
|
width: width,
|
|
332
338
|
height: height
|
|
333
339
|
}
|
|
334
|
-
}, dataSource && /*#__PURE__*/React.createElement(LuckTree, _extends({
|
|
340
|
+
}), dataSource && /*#__PURE__*/React.createElement(LuckTree, _extends({
|
|
335
341
|
blockNode: true,
|
|
336
342
|
className: classNames(styles.tree, _defineProperty({}, className, !!treeClassName)),
|
|
337
343
|
draggable: !readOnly && draggable,
|
package/es/helper/ldBuilder.js
CHANGED
|
@@ -3,7 +3,7 @@ import React, { useContext } from 'react';
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import { LuckDaContext } from "../components/Builder";
|
|
5
5
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
6
|
-
var ErrorWrapper = styled.span.withConfig({
|
|
6
|
+
export var ErrorWrapper = styled.span.withConfig({
|
|
7
7
|
displayName: "ErrorWrapper",
|
|
8
8
|
componentId: "luckda-6530__sc-ek28r3-0"
|
|
9
9
|
})(["display:inline-block;width:100%;height:auto;padding:24px 16px;color:#ff4d4f;"]);
|
|
@@ -298,31 +298,31 @@
|
|
|
298
298
|
"key": "onMount",
|
|
299
299
|
"name": "组件首次渲染时",
|
|
300
300
|
"desc": "在组件首次渲染时,执行方法",
|
|
301
|
-
"func": "(params)=>{\n\t\n}"
|
|
301
|
+
"func": "function onMount(params)=>{\n\t\n}"
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
304
|
"key": "onUnmount",
|
|
305
305
|
"name": "组件卸载时",
|
|
306
306
|
"desc": "在组件卸载时,执行方法。",
|
|
307
|
-
"func": "()=>{\n\t\n}"
|
|
307
|
+
"func": "function onUnmount()=>{\n\t\n}"
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
310
|
"key": "onAddCardClick",
|
|
311
311
|
"name": "新增卡片点击",
|
|
312
312
|
"desc": "点击新增卡片行时,执行方法",
|
|
313
|
-
"func": "()=>{\n\t\n}"
|
|
313
|
+
"func": "function onAddCardClick()=>{\n\t\n}"
|
|
314
314
|
},
|
|
315
315
|
{
|
|
316
316
|
"key": "onCardClick",
|
|
317
317
|
"name": "卡片单击",
|
|
318
318
|
"desc": "单击卡片行时,执行方法",
|
|
319
|
-
"func": "(data, e)=>{\n\t\n}"
|
|
319
|
+
"func": "function onCardClick(data, e)=>{\n\t\n}"
|
|
320
320
|
},
|
|
321
321
|
{
|
|
322
322
|
"key": "onCardDelete",
|
|
323
323
|
"name": "卡片删除",
|
|
324
324
|
"desc": "单击卡片删除图标,执行方法",
|
|
325
|
-
"func": "(data, e)=>{\n\t\n}"
|
|
325
|
+
"func": "function onCardDelete(data, e)=>{\n\t\n}"
|
|
326
326
|
},
|
|
327
327
|
{
|
|
328
328
|
"key": "onDrop",
|
|
@@ -418,7 +418,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
418
418
|
},
|
|
419
419
|
bodyStyle: {
|
|
420
420
|
height: 'calc(100% - 54px)',
|
|
421
|
-
backgroundColor: '
|
|
421
|
+
backgroundColor: 'var(--ant-component-background,#F0F2F5)'
|
|
422
422
|
},
|
|
423
423
|
visible: showPreview,
|
|
424
424
|
destroyOnClose: true,
|
|
@@ -28,8 +28,8 @@ var LeftBox = styled.div.withConfig({
|
|
|
28
28
|
var Option = styled.div.withConfig({
|
|
29
29
|
displayName: "Option",
|
|
30
30
|
componentId: "luckda-6530__sc-rwt684-3"
|
|
31
|
-
})(["width:100%;height:32px;cursor:pointer;line-height:32px;padding:0 8px;display:flex;justify-content:space-between;align-items:center;", " &:hover{background-color
|
|
32
|
-
return props.actived ? 'background-color: #e8e8e8;' : void 0;
|
|
31
|
+
})(["width:100%;height:32px;cursor:pointer;line-height:32px;padding:0 8px;display:flex;justify-content:space-between;align-items:center;", " &:hover{background-color:var(--ant-border-color-base,#e8e8e8);}"], function (props) {
|
|
32
|
+
return props.actived ? 'background-color: var(--ant-border-color-base, #e8e8e8);' : void 0;
|
|
33
33
|
});
|
|
34
34
|
var RightBox = styled.div.withConfig({
|
|
35
35
|
displayName: "RightBox",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '~@luck-helper/ui-design/es/style/themes/default.less';
|
|
2
|
+
|
|
1
3
|
.lc-painter-panel-action-bind-modal {
|
|
2
4
|
&-body {
|
|
3
5
|
width: 100%;
|
|
@@ -11,7 +13,7 @@
|
|
|
11
13
|
.selector-box {
|
|
12
14
|
width: 100%;
|
|
13
15
|
height: 620px;
|
|
14
|
-
border: 1px solid
|
|
16
|
+
border: 1px solid @border-color-base;
|
|
15
17
|
border-radius: 6px;
|
|
16
18
|
display: flex;
|
|
17
19
|
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
}
|
|
47
49
|
.selector-box-ul.action-category {
|
|
48
50
|
width: 120px;
|
|
49
|
-
border-right: 1px solid
|
|
51
|
+
border-right: 1px solid @border-color-base;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
.selecter-items-box {
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
.code-box {
|
|
70
72
|
width: 100%;
|
|
71
73
|
height: 620px;
|
|
72
|
-
border: 1px solid
|
|
74
|
+
border: 1px solid @border-color-base;
|
|
73
75
|
border-radius: 6px;
|
|
74
76
|
overflow: hidden;
|
|
75
77
|
display: flex;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '~@luck-helper/ui-design/es/style/themes/default.less';
|
|
2
|
+
|
|
1
3
|
.box {
|
|
2
4
|
position: absolute;
|
|
3
5
|
width: 0;
|
|
@@ -32,8 +34,8 @@
|
|
|
32
34
|
width: 100%;
|
|
33
35
|
height: 40px;
|
|
34
36
|
padding: 8px 16px;
|
|
35
|
-
border-bottom: 1px solid
|
|
36
|
-
background-color:
|
|
37
|
+
border-bottom: 1px solid @border-color-base;
|
|
38
|
+
background-color: @component-background;
|
|
37
39
|
display: flex;
|
|
38
40
|
align-items: center;
|
|
39
41
|
justify-content: flex-end;
|
|
@@ -52,16 +54,16 @@
|
|
|
52
54
|
margin: 0 2px;
|
|
53
55
|
cursor: pointer;
|
|
54
56
|
text-align: center;
|
|
55
|
-
color:
|
|
57
|
+
color: @text-color-secondary_luck;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
.toolbar-item:hover {
|
|
59
|
-
color:
|
|
61
|
+
color: @text-color;
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
.toolbar-item.actived {
|
|
63
|
-
color:
|
|
64
|
-
background:
|
|
65
|
+
color: @text-color-secondary_luck;
|
|
66
|
+
background: @layout-body-background;
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
.toolbar-item.disabled {
|
|
@@ -96,7 +98,8 @@
|
|
|
96
98
|
.ant-modal-close,
|
|
97
99
|
.ant-modal-footer,
|
|
98
100
|
.ant-drawer-header,
|
|
99
|
-
.ant-drawer-footer
|
|
101
|
+
.ant-drawer-footer,
|
|
102
|
+
.luck-card-list>* {
|
|
100
103
|
pointer-events: none;
|
|
101
104
|
}
|
|
102
105
|
.luck-grid-table {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '~@luck-helper/ui-design/es/style/themes/default.less';
|
|
2
|
+
|
|
1
3
|
.lc-painter-panel-section-components-listeditor {
|
|
2
4
|
display: flex;
|
|
3
5
|
align-items: center;
|
|
@@ -8,8 +10,8 @@
|
|
|
8
10
|
.list-item {
|
|
9
11
|
height: 28px;
|
|
10
12
|
position: relative;
|
|
11
|
-
background:
|
|
12
|
-
border: 1px solid
|
|
13
|
+
background: @component-background;
|
|
14
|
+
border: 1px solid @border-color-base;
|
|
13
15
|
border-radius: 6px;
|
|
14
16
|
margin-bottom: 8px;
|
|
15
17
|
display: flex;
|
|
@@ -62,7 +64,7 @@
|
|
|
62
64
|
border-radius: 10px;
|
|
63
65
|
font-weight: bold;
|
|
64
66
|
font-size: 14px;
|
|
65
|
-
background-color:
|
|
67
|
+
background-color: @component-background;
|
|
66
68
|
padding: 0 8px;
|
|
67
69
|
display: flex;
|
|
68
70
|
align-items: center;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@import '~@luck-helper/ui-design/es/style/themes/default.less';
|
|
2
|
+
|
|
1
3
|
.lc-painter-panel-section-components-number-input {
|
|
2
4
|
.num-input-wrap {
|
|
3
5
|
position: relative;
|
|
@@ -10,7 +12,7 @@
|
|
|
10
12
|
display: inline-block;
|
|
11
13
|
position: absolute;
|
|
12
14
|
right: 26px;
|
|
13
|
-
color:
|
|
15
|
+
color: @text-color;
|
|
14
16
|
cursor: pointer;
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@import '~@luck-helper/ui-design/es/style/themes/default.less';
|
|
2
|
+
|
|
3
|
+
@colorful-prefix: ~'@{luck-ant-prefix}-colorful';
|
|
4
|
+
|
|
1
5
|
.lc-painter-panel-attrs {
|
|
2
6
|
position: relative;
|
|
3
7
|
width: 100%;
|
|
@@ -13,7 +17,7 @@
|
|
|
13
17
|
|
|
14
18
|
&-header {
|
|
15
19
|
height: 28px;
|
|
16
|
-
background-color:
|
|
20
|
+
background-color: var(~'--@{colorful-prefix}-primary-dark-2',#e8e8e8);
|
|
17
21
|
display: flex;
|
|
18
22
|
align-items: center;
|
|
19
23
|
justify-content: space-between;
|
|
@@ -21,14 +25,14 @@
|
|
|
21
25
|
font-size: 12px;
|
|
22
26
|
}
|
|
23
27
|
&-header:hover {
|
|
24
|
-
background-color:
|
|
28
|
+
background-color: var(~'--@{colorful-prefix}-primary-dark-1',#e3e3e3);
|
|
25
29
|
cursor: pointer;
|
|
26
30
|
}
|
|
27
31
|
|
|
28
32
|
&-body {
|
|
29
33
|
flex: 1;
|
|
30
34
|
overflow-y: auto;
|
|
31
|
-
background-color:
|
|
35
|
+
background-color: @component-background;
|
|
32
36
|
padding: 16px 0 8px;
|
|
33
37
|
}
|
|
34
38
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
@import '~@luck-helper/ui-design/es/style/themes/default.less';
|
|
2
|
+
|
|
1
3
|
.lc-painter-panel {
|
|
2
4
|
position: relative;
|
|
3
5
|
width: 320px;
|
|
4
6
|
height: 100%;
|
|
5
|
-
border-left: 1px solid
|
|
7
|
+
border-left: 1px solid @border-color-base;
|
|
6
8
|
display: flex;
|
|
7
9
|
flex-direction: column;
|
|
8
|
-
background-color:
|
|
10
|
+
background-color: @component-background;
|
|
9
11
|
|
|
10
12
|
&-empty {
|
|
11
13
|
position: absolute;
|
|
@@ -25,8 +27,8 @@
|
|
|
25
27
|
width: 100%;
|
|
26
28
|
height: 40px;
|
|
27
29
|
padding: 8px 16px;
|
|
28
|
-
border-bottom: 1px solid
|
|
29
|
-
background-color:
|
|
30
|
+
border-bottom: 1px solid @border-color-base;
|
|
31
|
+
background-color: @component-background;
|
|
30
32
|
display: flex;
|
|
31
33
|
align-items: center;
|
|
32
34
|
.active-node-level:hover {
|
|
@@ -52,11 +54,11 @@
|
|
|
52
54
|
align-items: center;
|
|
53
55
|
|
|
54
56
|
&:hover {
|
|
55
|
-
color:
|
|
57
|
+
color: @text-color;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
&.actived {
|
|
59
|
-
color:
|
|
61
|
+
color: @text-color;
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
& > i {
|
|
@@ -66,7 +68,7 @@
|
|
|
66
68
|
|
|
67
69
|
:global {
|
|
68
70
|
li#header-active {
|
|
69
|
-
color:
|
|
71
|
+
color: @text-color;
|
|
70
72
|
position: relative;
|
|
71
73
|
}
|
|
72
74
|
}
|
|
@@ -332,12 +332,11 @@ LCCardList.propTypes = {
|
|
|
332
332
|
*/
|
|
333
333
|
suppressActions: PropTypes.bool,
|
|
334
334
|
/**
|
|
335
|
-
* @name
|
|
336
|
-
* @type
|
|
337
|
-
* @default
|
|
338
|
-
* @groupNext actionsColumn
|
|
335
|
+
* @name 拖拽排序
|
|
336
|
+
* @type switch
|
|
337
|
+
* @default false
|
|
339
338
|
*/
|
|
340
|
-
|
|
339
|
+
draggable: PropTypes.bool,
|
|
341
340
|
/**
|
|
342
341
|
* @name 操作项
|
|
343
342
|
* @type _TableActions
|
|
@@ -405,12 +404,6 @@ LCCardList.propTypes = {
|
|
|
405
404
|
batchOperations: PropTypes.shape({
|
|
406
405
|
todoList: PropTypes.array.isRequired
|
|
407
406
|
}),
|
|
408
|
-
/**
|
|
409
|
-
* @name 每页行数
|
|
410
|
-
* @type number
|
|
411
|
-
* @default 40
|
|
412
|
-
*/
|
|
413
|
-
pageSize: PropTypes.number,
|
|
414
407
|
/**
|
|
415
408
|
* @name 无边框风格
|
|
416
409
|
* @type switch
|
|
@@ -465,6 +458,18 @@ LCCardList.propTypes = {
|
|
|
465
458
|
* @default "function renderContent(record) { \n return null; \n}"
|
|
466
459
|
*/
|
|
467
460
|
renderContent: PropTypes.string,
|
|
461
|
+
/**
|
|
462
|
+
* @name 开启分页
|
|
463
|
+
* @type switch
|
|
464
|
+
* @default true
|
|
465
|
+
*/
|
|
466
|
+
pagination: PropTypes.bool,
|
|
467
|
+
/**
|
|
468
|
+
* @name 每页行数
|
|
469
|
+
* @type number
|
|
470
|
+
* @default 40
|
|
471
|
+
*/
|
|
472
|
+
pageSize: PropTypes.number,
|
|
468
473
|
/**
|
|
469
474
|
* @name 组件首次渲染时
|
|
470
475
|
* @type _JSEditor
|
|
@@ -298,31 +298,31 @@
|
|
|
298
298
|
"key": "onMount",
|
|
299
299
|
"name": "组件首次渲染时",
|
|
300
300
|
"desc": "在组件首次渲染时,执行方法",
|
|
301
|
-
"func": "(params)=>{\n\t\n}"
|
|
301
|
+
"func": "function onMount(params)=>{\n\t\n}"
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
304
|
"key": "onUnmount",
|
|
305
305
|
"name": "组件卸载时",
|
|
306
306
|
"desc": "在组件卸载时,执行方法。",
|
|
307
|
-
"func": "()=>{\n\t\n}"
|
|
307
|
+
"func": "function onUnmount()=>{\n\t\n}"
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
310
|
"key": "onAddCardClick",
|
|
311
311
|
"name": "新增卡片点击",
|
|
312
312
|
"desc": "点击新增卡片行时,执行方法",
|
|
313
|
-
"func": "()=>{\n\t\n}"
|
|
313
|
+
"func": "function onAddCardClick()=>{\n\t\n}"
|
|
314
314
|
},
|
|
315
315
|
{
|
|
316
316
|
"key": "onCardClick",
|
|
317
317
|
"name": "卡片单击",
|
|
318
318
|
"desc": "单击卡片行时,执行方法",
|
|
319
|
-
"func": "(data, e)=>{\n\t\n}"
|
|
319
|
+
"func": "function onCardClick(data, e)=>{\n\t\n}"
|
|
320
320
|
},
|
|
321
321
|
{
|
|
322
322
|
"key": "onCardDelete",
|
|
323
323
|
"name": "卡片删除",
|
|
324
324
|
"desc": "单击卡片删除图标,执行方法",
|
|
325
|
-
"func": "(data, e)=>{\n\t\n}"
|
|
325
|
+
"func": "function onCardDelete(data, e)=>{\n\t\n}"
|
|
326
326
|
},
|
|
327
327
|
{
|
|
328
328
|
"key": "onDrop",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import React, { useRef, useState } from 'react';
|
|
4
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { useMemoizedFn, useAsyncEffect, useBoolean, useLatest } from 'ahooks';
|
|
6
|
+
import { useMemoizedFn, useAsyncEffect, useBoolean, useLatest, useInViewport } from 'ahooks';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { Tree, Empty, Spin } from 'luck-design/antd';
|
|
9
9
|
import { isNil } from 'lodash';
|
|
@@ -42,14 +42,19 @@ var LCGroupTree = function LCGroupTree(_ref) {
|
|
|
42
42
|
advance = _ref.advance;
|
|
43
43
|
var ctx = useContext();
|
|
44
44
|
var ref = useRef();
|
|
45
|
+
var titleRef = useRef();
|
|
45
46
|
var _useState = useState(null),
|
|
46
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47
48
|
dataSource = _useState2[0],
|
|
48
49
|
setDataSource = _useState2[1];
|
|
49
|
-
var _useState3 = useState(
|
|
50
|
+
var _useState3 = useState(null),
|
|
50
51
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
titleHeight = _useState4[0],
|
|
53
|
+
setTitleHeight = _useState4[1];
|
|
54
|
+
var _useState5 = useState([]),
|
|
55
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
56
|
+
selectedKeys = _useState6[0],
|
|
57
|
+
setSelectedKeys = _useState6[1];
|
|
53
58
|
var _useBoolean = useBoolean(false),
|
|
54
59
|
_useBoolean2 = _slicedToArray(_useBoolean, 2),
|
|
55
60
|
loading = _useBoolean2[0],
|
|
@@ -57,6 +62,15 @@ var LCGroupTree = function LCGroupTree(_ref) {
|
|
|
57
62
|
setTrue = _useBoolean2$.setTrue,
|
|
58
63
|
setFalse = _useBoolean2$.setFalse;
|
|
59
64
|
var latestOnlySelectLeaf = useLatest(onlySelectLeaf);
|
|
65
|
+
var _useInViewport = useInViewport(titleRef),
|
|
66
|
+
_useInViewport2 = _slicedToArray(_useInViewport, 1),
|
|
67
|
+
inViewport = _useInViewport2[0];
|
|
68
|
+
useEffect(function () {
|
|
69
|
+
if (inViewport) {
|
|
70
|
+
var _title = document.getElementById('title');
|
|
71
|
+
setTitleHeight(_title.getBoundingClientRect().height);
|
|
72
|
+
}
|
|
73
|
+
}, [inViewport]);
|
|
60
74
|
var handleSelect = useMemoizedFn(function (_selectedKeys, e) {
|
|
61
75
|
if (cancelSelect || e.selected) {
|
|
62
76
|
setSelectedKeys(_selectedKeys);
|
|
@@ -142,9 +156,11 @@ var LCGroupTree = function LCGroupTree(_ref) {
|
|
|
142
156
|
getTargetDom: getTargetDom
|
|
143
157
|
}, /*#__PURE__*/React.createElement(TreeBox, {
|
|
144
158
|
ref: ref,
|
|
145
|
-
$css: css
|
|
159
|
+
$css: "".concat(css, ";height:calc(100% - ").concat(titleHeight, "px)")
|
|
146
160
|
}, title ? /*#__PURE__*/React.createElement(Title, {
|
|
147
|
-
$theme: document.body.getAttribute('luck-theme')
|
|
161
|
+
$theme: document.body.getAttribute('luck-theme'),
|
|
162
|
+
id: 'title',
|
|
163
|
+
ref: titleRef
|
|
148
164
|
}, title) : null, /*#__PURE__*/React.createElement(Spin, {
|
|
149
165
|
spinning: loading,
|
|
150
166
|
style: {
|
|
@@ -2,13 +2,12 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["id", "path", "css", "supportFullScreen"];
|
|
5
|
-
import React, { useRef } from 'react';
|
|
6
|
-
import {
|
|
5
|
+
import React, { useEffect, useRef } from 'react';
|
|
6
|
+
import { useFullscreen, useHover, useMemoizedFn } from 'ahooks';
|
|
7
7
|
import { Icon, Tooltip } from 'luck-design/antd';
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import Wrapper from "../Wrapper";
|
|
10
10
|
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
11
|
-
import { RUNTIME } from "../../../constants";
|
|
12
11
|
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
13
12
|
var StyledIframe = styled.iframe.withConfig({
|
|
14
13
|
displayName: "StyledIframe",
|