@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,14 +1,15 @@
|
|
|
1
1
|
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
|
-
var _excluded = ["id", "src", "css"];
|
|
5
|
-
import React, { useRef } from 'react';
|
|
4
|
+
var _excluded = ["id", "src", "css", "advance", "onClick"];
|
|
5
|
+
import React, { useEffect, useRef } from 'react';
|
|
6
6
|
import { useHover, useMemoizedFn, useSetState } from 'ahooks';
|
|
7
7
|
import styled from 'styled-components';
|
|
8
8
|
import { ImgPreview } from 'luck-design';
|
|
9
9
|
import Wrapper from "../Wrapper";
|
|
10
10
|
import styles from "./index.less";
|
|
11
11
|
import { Icon } from 'luck-design/antd';
|
|
12
|
+
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
12
13
|
var StyledImage = styled.img.withConfig({
|
|
13
14
|
displayName: "StyledImage",
|
|
14
15
|
componentId: "luckda-6530__sc-k6wbym-0"
|
|
@@ -29,6 +30,8 @@ var LCImage = function LCImage(_ref) {
|
|
|
29
30
|
var id = _ref.id,
|
|
30
31
|
src = _ref.src,
|
|
31
32
|
css = _ref.css,
|
|
33
|
+
advance = _ref.advance,
|
|
34
|
+
onClick = _ref.onClick,
|
|
32
35
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
33
36
|
var ref = useRef();
|
|
34
37
|
var isHovering = useHover(ref);
|
|
@@ -39,6 +42,22 @@ var LCImage = function LCImage(_ref) {
|
|
|
39
42
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
|
40
43
|
state = _useSetState2[0],
|
|
41
44
|
setState = _useSetState2[1];
|
|
45
|
+
var ctx = useContext();
|
|
46
|
+
useEffect(function () {
|
|
47
|
+
ctx.doAction(advance.events.onMount);
|
|
48
|
+
return function () {
|
|
49
|
+
return ctx.doAction(advance.events.onUnmount);
|
|
50
|
+
};
|
|
51
|
+
}, []);
|
|
52
|
+
var handleClick = useMemoizedFn(function (e) {
|
|
53
|
+
if (onClick) {
|
|
54
|
+
onClick(e);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
ctx.doAction(advance.events.onClick, {
|
|
58
|
+
e: e
|
|
59
|
+
});
|
|
60
|
+
});
|
|
42
61
|
var getTargetDom = useMemoizedFn(function () {
|
|
43
62
|
return ref.current;
|
|
44
63
|
});
|
|
@@ -71,7 +90,8 @@ var LCImage = function LCImage(_ref) {
|
|
|
71
90
|
return setState({
|
|
72
91
|
visible: false
|
|
73
92
|
});
|
|
74
|
-
}
|
|
93
|
+
},
|
|
94
|
+
onClick: handleClick
|
|
75
95
|
})));
|
|
76
96
|
};
|
|
77
97
|
export default LCImage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["id", "css"];
|
|
4
|
-
import React, { useRef } from 'react';
|
|
3
|
+
var _excluded = ["id", "css", "onClick", "advance"];
|
|
4
|
+
import React, { useEffect, useRef } from 'react';
|
|
5
5
|
import { useMemoizedFn } from 'ahooks';
|
|
6
6
|
import { omitBadProps } from "../../../engine/tools/helper";
|
|
7
7
|
import defaultMeta from "../../../engine/meta/link.props.default.json";
|
|
@@ -28,9 +28,26 @@ var StyledLink = styled.a.withConfig({
|
|
|
28
28
|
var LCLink = function LCLink(_ref) {
|
|
29
29
|
var id = _ref.id,
|
|
30
30
|
css = _ref.css,
|
|
31
|
+
onClick = _ref.onClick,
|
|
32
|
+
advance = _ref.advance,
|
|
31
33
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
34
|
var ref = useRef();
|
|
33
35
|
var ctx = useContext();
|
|
36
|
+
useEffect(function () {
|
|
37
|
+
ctx.doAction(advance.events.onMount);
|
|
38
|
+
return function () {
|
|
39
|
+
return ctx.doAction(advance.events.onUnmount);
|
|
40
|
+
};
|
|
41
|
+
}, []);
|
|
42
|
+
var handleClick = useMemoizedFn(function (e) {
|
|
43
|
+
if (onClick) {
|
|
44
|
+
onClick(e);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
ctx.doAction(advance.events.onClick, {
|
|
48
|
+
e: e
|
|
49
|
+
});
|
|
50
|
+
});
|
|
34
51
|
var getTargetDom = useMemoizedFn(function () {
|
|
35
52
|
return ref.current;
|
|
36
53
|
});
|
|
@@ -46,6 +63,7 @@ var LCLink = function LCLink(_ref) {
|
|
|
46
63
|
target: props.isBlank ? '_blank' : '_self',
|
|
47
64
|
title: props.textOverflow && props.content,
|
|
48
65
|
onClick: function onClick(e) {
|
|
66
|
+
handleClick(e);
|
|
49
67
|
ctx.runtime === RUNTIME.DESIGN && e.preventDefault();
|
|
50
68
|
}
|
|
51
69
|
}), props.content));
|
|
@@ -464,9 +464,7 @@ var LCTable = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
464
464
|
var condition = _zebra !== null && _zebra !== void 0 && _zebra.condition ? executeCode(ctx, _zebra.condition, ['params'], params) : _zebra && params.node.rowIndex % 2 === 0;
|
|
465
465
|
return condition ? {
|
|
466
466
|
'background-color': _zebra.color || _zebra
|
|
467
|
-
} : {
|
|
468
|
-
'background-color': '#fff'
|
|
469
|
-
};
|
|
467
|
+
} : {};
|
|
470
468
|
});
|
|
471
469
|
var _readFilter = useMemoizedFn(function (params, filters) {
|
|
472
470
|
ctx.doAction(advance.events.onFilterChanged, {
|
|
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["id", "
|
|
6
|
-
import React, { useRef, useImperativeHandle, useState,
|
|
5
|
+
var _excluded = ["id", "className", "dataset", "width", "height", "showLine", "defaultExpandDeep", "actions", "editable", "showRootAdd", "onlyRoot", "rootAddSetting", "doubleClickExpand", "onDoubleClick", "treeNodeCheckable", "treeNodeDisableCheckbox", "treeNodeDisable", "onTreeNodeRender", "treeNodeIcon", "advance", "cancelSelect", "defaultSelect"];
|
|
6
|
+
import React, { useRef, useImperativeHandle, useState, forwardRef } from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import { useMemoizedFn, useCreation } from 'ahooks';
|
|
9
9
|
import classNames from 'classnames';
|
|
@@ -13,13 +13,14 @@ import { suid } from '@luck-design-biz/base/utils';
|
|
|
13
13
|
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
14
14
|
import Wrapper from "../Wrapper";
|
|
15
15
|
import { LdTree } from "../../../../index";
|
|
16
|
+
import useCombinedRefs from "../../../engine/tools/useCombinedRefs";
|
|
16
17
|
import { omitBadProps, executeCode } from "../../../engine/tools/helper";
|
|
17
18
|
import defaultMeta from "../../../engine/meta/tree.props.default.json";
|
|
19
|
+
import { LC_COMPONENT_UNIT_KEY, LC_COMPONENT_UNIT } from "../../../constants";
|
|
18
20
|
import styles from "./index.less";
|
|
19
21
|
var PRIMARY = window.appConfig.constraintKeys.PRIMARY;
|
|
20
|
-
var LCTree = function
|
|
22
|
+
var LCTree = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
21
23
|
var id = _ref.id,
|
|
22
|
-
wrapperRef = _ref.wrapperRef,
|
|
23
24
|
className = _ref.className,
|
|
24
25
|
dataset = _ref.dataset,
|
|
25
26
|
width = _ref.width,
|
|
@@ -43,20 +44,20 @@ var LCTree = function LCTree(_ref) {
|
|
|
43
44
|
defaultSelect = _ref.defaultSelect,
|
|
44
45
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
45
46
|
var ctx = useContext();
|
|
46
|
-
var ref = useRef();
|
|
47
47
|
var apiRef = useRef();
|
|
48
|
-
var
|
|
48
|
+
var wrapperRef = useRef();
|
|
49
|
+
var instanceRef = useCombinedRefs(ref);
|
|
49
50
|
var _useState = useState([]),
|
|
50
51
|
_useState2 = _slicedToArray(_useState, 2),
|
|
51
52
|
selectedKeys = _useState2[0],
|
|
52
53
|
setSelectedKeys = _useState2[1];
|
|
53
54
|
var getTargetDom = useMemoizedFn(function () {
|
|
54
|
-
return
|
|
55
|
+
return wrapperRef.current;
|
|
55
56
|
});
|
|
56
57
|
useImperativeHandle(apiRef, function () {
|
|
57
58
|
return {
|
|
58
59
|
getInstance: function getInstance() {
|
|
59
|
-
return
|
|
60
|
+
return instanceRef.current;
|
|
60
61
|
}
|
|
61
62
|
};
|
|
62
63
|
});
|
|
@@ -141,6 +142,11 @@ var LCTree = function LCTree(_ref) {
|
|
|
141
142
|
doAction();
|
|
142
143
|
}
|
|
143
144
|
};
|
|
145
|
+
var _wrapperProps = useCreation(function () {
|
|
146
|
+
return _defineProperty({
|
|
147
|
+
id: id
|
|
148
|
+
}, LC_COMPONENT_UNIT_KEY, LC_COMPONENT_UNIT);
|
|
149
|
+
}, []);
|
|
144
150
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
145
151
|
id: id,
|
|
146
152
|
displayName: "Tree",
|
|
@@ -151,8 +157,9 @@ var LCTree = function LCTree(_ref) {
|
|
|
151
157
|
height: height,
|
|
152
158
|
id: id,
|
|
153
159
|
ldId: id,
|
|
154
|
-
ref:
|
|
155
|
-
|
|
160
|
+
ref: instanceRef,
|
|
161
|
+
wrapper: wrapperRef,
|
|
162
|
+
wrapperProps: _wrapperProps,
|
|
156
163
|
className: classNames(styles['lc-component-tree'], _defineProperty({}, className, !!className)),
|
|
157
164
|
dataSetKey: dataset === null || dataset === void 0 ? void 0 : dataset.code,
|
|
158
165
|
showLine: showLine,
|
|
@@ -218,7 +225,7 @@ var LCTree = function LCTree(_ref) {
|
|
|
218
225
|
onSelect: handleSelect,
|
|
219
226
|
afterInit: afterInit
|
|
220
227
|
}, events, props)));
|
|
221
|
-
};
|
|
228
|
+
});
|
|
222
229
|
LCTree.propTypes = {
|
|
223
230
|
/**
|
|
224
231
|
* @name 唯一标识
|
|
@@ -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;
|
|
@@ -6,12 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
11
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
12
13
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
15
|
var _umi = require("umi");
|
|
16
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
16
18
|
var _antd = require("luck-design/antd");
|
|
17
19
|
var _luckDesign = require("luck-design");
|
|
@@ -182,9 +184,14 @@ var LdCard = function LdCard(_ref2) {
|
|
|
182
184
|
});
|
|
183
185
|
}
|
|
184
186
|
});
|
|
187
|
+
var _ref3 = wrapperProps || {},
|
|
188
|
+
className = _ref3.className,
|
|
189
|
+
_wrapperProps = _ref3._wrapperProps;
|
|
185
190
|
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
186
191
|
ref: wrapper
|
|
187
|
-
},
|
|
192
|
+
}, _wrapperProps, {
|
|
193
|
+
className: (0, _classnames.default)('luck-card-list', (0, _defineProperty2.default)({}, className, !!className))
|
|
194
|
+
}), (0, _lodash.difference)(Object.keys(params), resultSet.invisibleSet || []).length > 0 && /*#__PURE__*/_react.default.createElement(_luckDesign.ResultSet, (0, _extends2.default)({
|
|
188
195
|
set: params,
|
|
189
196
|
onQuery: onQuery
|
|
190
197
|
}, resultSet, {
|
|
@@ -209,13 +216,13 @@ var ForwardLdCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
209
216
|
wrapperRef: ref
|
|
210
217
|
}, props));
|
|
211
218
|
});
|
|
212
|
-
var LdIndex = function LdIndex(
|
|
213
|
-
var namespace =
|
|
214
|
-
moduleCode =
|
|
215
|
-
suppressInit =
|
|
216
|
-
overModel =
|
|
217
|
-
afterQuery =
|
|
218
|
-
props = (0, _objectWithoutProperties2.default)(
|
|
219
|
+
var LdIndex = function LdIndex(_ref4) {
|
|
220
|
+
var namespace = _ref4.ldId,
|
|
221
|
+
moduleCode = _ref4.moduleCode,
|
|
222
|
+
suppressInit = _ref4.suppressInit,
|
|
223
|
+
overModel = _ref4.overModel,
|
|
224
|
+
afterQuery = _ref4.afterQuery,
|
|
225
|
+
props = (0, _objectWithoutProperties2.default)(_ref4, _excluded2);
|
|
219
226
|
if ((0, _lodash.includes)(props.isTree, props.dataSetKey)) return (0, _utils.formatMessage)({
|
|
220
227
|
id: 'luckda.ldCard.notTres',
|
|
221
228
|
label: '此数据集为树形数据集,请选择非树形数据集'
|
|
@@ -21,10 +21,10 @@ var _antd = require("luck-design/antd");
|
|
|
21
21
|
var _luckDesign = require("luck-design");
|
|
22
22
|
var _utils = require("@luck-design-biz/base/utils");
|
|
23
23
|
var _base = require("@luck-design-biz/base");
|
|
24
|
-
var _ldBuilder =
|
|
24
|
+
var _ldBuilder = _interopRequireWildcard(require("../../helper/ldBuilder"));
|
|
25
25
|
var _utils2 = require("../../utils");
|
|
26
26
|
var _index = _interopRequireDefault(require("./index.less"));
|
|
27
|
-
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", "
|
|
27
|
+
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"],
|
|
28
28
|
_excluded2 = ["0"],
|
|
29
29
|
_excluded3 = ["onClick"];
|
|
30
30
|
var _window$appConfig$con = window.appConfig.constraintKeys,
|
|
@@ -67,7 +67,8 @@ var LdTree = function LdTree(_ref) {
|
|
|
67
67
|
isTree = _ref.isTree,
|
|
68
68
|
service = _ref.service,
|
|
69
69
|
dataToTreeFormat = _ref.dataToTreeFormat,
|
|
70
|
-
|
|
70
|
+
wrapper = _ref.wrapper,
|
|
71
|
+
wrapperProps = _ref.wrapperProps,
|
|
71
72
|
doubleClickExpand = _ref.doubleClickExpand,
|
|
72
73
|
onNodeDoubleClick = _ref.onNodeDoubleClick,
|
|
73
74
|
width = _ref.width,
|
|
@@ -84,10 +85,14 @@ var LdTree = function LdTree(_ref) {
|
|
|
84
85
|
onTreeNodeRender = _ref.onTreeNodeRender,
|
|
85
86
|
onlyRoot = _ref.onlyRoot,
|
|
86
87
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
87
|
-
if (!(0, _lodash.includes)(isTree, dataSetKey)) return (
|
|
88
|
+
if (!(0, _lodash.includes)(isTree, dataSetKey)) return /*#__PURE__*/_react.default.createElement(_ldBuilder.ErrorWrapper, {
|
|
89
|
+
ref: wrapper,
|
|
90
|
+
className: className,
|
|
91
|
+
style: props.style
|
|
92
|
+
}, (0, _utils.formatMessage)({
|
|
88
93
|
id: 'luckda.ldTree.notTrees',
|
|
89
94
|
label: '此数据集非树形数据集,请选择树形数据集'
|
|
90
|
-
});
|
|
95
|
+
}));
|
|
91
96
|
var _useState = (0, _react.useState)(null),
|
|
92
97
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
93
98
|
dataSource = _useState2[0],
|
|
@@ -327,19 +332,20 @@ var LdTree = function LdTree(_ref) {
|
|
|
327
332
|
loadData: onLoadData
|
|
328
333
|
} : {};
|
|
329
334
|
}, []);
|
|
330
|
-
return /*#__PURE__*/_react.default.createElement(_base.TreeBox, {
|
|
335
|
+
return /*#__PURE__*/_react.default.createElement(_base.TreeBox, (0, _extends2.default)({
|
|
331
336
|
suppressTitle: !title,
|
|
332
337
|
title: title,
|
|
333
338
|
loading: loading,
|
|
334
339
|
id: ldId,
|
|
335
340
|
onAdd: onAdd,
|
|
336
341
|
className: className,
|
|
337
|
-
ref:
|
|
342
|
+
ref: wrapper
|
|
343
|
+
}, wrapperProps, {
|
|
338
344
|
style: {
|
|
339
345
|
width: width,
|
|
340
346
|
height: height
|
|
341
347
|
}
|
|
342
|
-
}, dataSource && /*#__PURE__*/_react.default.createElement(_luckDesign.LuckTree, (0, _extends2.default)({
|
|
348
|
+
}), dataSource && /*#__PURE__*/_react.default.createElement(_luckDesign.LuckTree, (0, _extends2.default)({
|
|
343
349
|
blockNode: true,
|
|
344
350
|
className: (0, _classnames.default)(_index.default.tree, (0, _defineProperty2.default)({}, className, !!treeClassName)),
|
|
345
351
|
draggable: !readOnly && draggable,
|
package/lib/helper/ldBuilder.js
CHANGED
|
@@ -5,13 +5,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.default = exports.ErrorWrapper = void 0;
|
|
9
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
12
12
|
var _Builder = require("../components/Builder");
|
|
13
13
|
var _utils = require("@luck-design-biz/base/utils");
|
|
14
|
-
var ErrorWrapper = _styledComponents.default.span.withConfig({
|
|
14
|
+
var ErrorWrapper = exports.ErrorWrapper = _styledComponents.default.span.withConfig({
|
|
15
15
|
displayName: "ErrorWrapper",
|
|
16
16
|
componentId: "luckda-6530__sc-ek28r3-0"
|
|
17
17
|
})(["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",
|
|
@@ -426,7 +426,7 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
426
426
|
},
|
|
427
427
|
bodyStyle: {
|
|
428
428
|
height: 'calc(100% - 54px)',
|
|
429
|
-
backgroundColor: '
|
|
429
|
+
backgroundColor: 'var(--ant-component-background,#F0F2F5)'
|
|
430
430
|
},
|
|
431
431
|
visible: showPreview,
|
|
432
432
|
destroyOnClose: true,
|
|
@@ -36,8 +36,8 @@ var LeftBox = _styledComponents.default.div.withConfig({
|
|
|
36
36
|
var Option = _styledComponents.default.div.withConfig({
|
|
37
37
|
displayName: "Option",
|
|
38
38
|
componentId: "luckda-6530__sc-rwt684-3"
|
|
39
|
-
})(["width:100%;height:32px;cursor:pointer;line-height:32px;padding:0 8px;display:flex;justify-content:space-between;align-items:center;", " &:hover{background-color
|
|
40
|
-
return props.actived ? 'background-color: #e8e8e8;' : void 0;
|
|
39
|
+
})(["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) {
|
|
40
|
+
return props.actived ? 'background-color: var(--ant-border-color-base, #e8e8e8);' : void 0;
|
|
41
41
|
});
|
|
42
42
|
var RightBox = _styledComponents.default.div.withConfig({
|
|
43
43
|
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
|
}
|