@aloudata/aloudata-design 2.15.5 → 2.15.6
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/dist/AldSelect/style/index.less +1 -0
- package/dist/InputSearch/index.js +3 -1
- package/dist/LogicTree/components/LogicItem/index.d.ts +4 -1
- package/dist/LogicTree/components/LogicItem/index.js +3 -2
- package/dist/LogicTree/index.d.ts +3 -0
- package/dist/LogicTree/index.js +4 -2
- package/dist/ald.min.css +1 -1
- package/package.json +1 -1
|
@@ -72,9 +72,11 @@ export default function InputSearch(props) {
|
|
|
72
72
|
var newValue = e.target.value;
|
|
73
73
|
if (debounce) {
|
|
74
74
|
debounceSearch(newValue);
|
|
75
|
+
} else {
|
|
76
|
+
onSearch(newValue);
|
|
75
77
|
}
|
|
76
78
|
setSearchValue(newValue);
|
|
77
|
-
}, [debounceSearch,
|
|
79
|
+
}, [debounce, debounceSearch, onSearch]);
|
|
78
80
|
var iconSize = useMemo(function () {
|
|
79
81
|
if (size === 'middle' || size === 'large') {
|
|
80
82
|
return 20;
|
|
@@ -13,6 +13,9 @@ interface IProps<T> {
|
|
|
13
13
|
hoverId: string;
|
|
14
14
|
setHoverId: (id: string) => void;
|
|
15
15
|
isRoot?: boolean;
|
|
16
|
+
hideBottomBtn?: {
|
|
17
|
+
addRelation?: boolean;
|
|
18
|
+
};
|
|
16
19
|
}
|
|
17
|
-
export default function LogicItem<T>({ value, addCondition, addRelation, changeRecordData, remove, changeRelation, renderCondition, onDragEnd, hoverId, setHoverId, isRoot, }: IProps<T>): React.JSX.Element;
|
|
20
|
+
export default function LogicItem<T>({ value, addCondition, addRelation, changeRecordData, remove, changeRelation, renderCondition, onDragEnd, hoverId, setHoverId, isRoot, hideBottomBtn, }: IProps<T>): React.JSX.Element;
|
|
18
21
|
export {};
|
|
@@ -32,7 +32,8 @@ export default function LogicItem(_ref) {
|
|
|
32
32
|
hoverId = _ref.hoverId,
|
|
33
33
|
setHoverId = _ref.setHoverId,
|
|
34
34
|
_ref$isRoot = _ref.isRoot,
|
|
35
|
-
isRoot = _ref$isRoot === void 0 ? false : _ref$isRoot
|
|
35
|
+
isRoot = _ref$isRoot === void 0 ? false : _ref$isRoot,
|
|
36
|
+
hideBottomBtn = _ref.hideBottomBtn;
|
|
36
37
|
var _useState = useState(false),
|
|
37
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
38
39
|
isHoverDragBox = _useState2[0],
|
|
@@ -269,7 +270,7 @@ export default function LogicItem(_ref) {
|
|
|
269
270
|
size: 24
|
|
270
271
|
}),
|
|
271
272
|
onClick: onAddCondition
|
|
272
|
-
}, t.LogicTree.btn.addCondition), /*#__PURE__*/React.createElement(TextLink, {
|
|
273
|
+
}, t.LogicTree.btn.addCondition), !(hideBottomBtn !== null && hideBottomBtn !== void 0 && hideBottomBtn.addRelation) && /*#__PURE__*/React.createElement(TextLink, {
|
|
273
274
|
icon: /*#__PURE__*/React.createElement(PlusIcon, {
|
|
274
275
|
size: 24
|
|
275
276
|
}),
|
package/dist/LogicTree/index.js
CHANGED
|
@@ -28,7 +28,8 @@ export default function LogicTree(props) {
|
|
|
28
28
|
rootNodeAllowedEmpty = props.rootNodeAllowedEmpty,
|
|
29
29
|
className = props.className,
|
|
30
30
|
_props$needDndProvide = props.needDndProvider,
|
|
31
|
-
needDndProvider = _props$needDndProvide === void 0 ? false : _props$needDndProvide
|
|
31
|
+
needDndProvider = _props$needDndProvide === void 0 ? false : _props$needDndProvide,
|
|
32
|
+
hideBottomBtn = props.hideBottomBtn;
|
|
32
33
|
var initialNode = {
|
|
33
34
|
id: getUniqId(),
|
|
34
35
|
type: ENodeType.LOGIC,
|
|
@@ -132,8 +133,9 @@ export default function LogicTree(props) {
|
|
|
132
133
|
hoverId: hoverItemId,
|
|
133
134
|
setHoverId: setHoverItemId,
|
|
134
135
|
isRoot: true // 将最顶层的LogicItem标记为根节点
|
|
136
|
+
,
|
|
137
|
+
hideBottomBtn: hideBottomBtn
|
|
135
138
|
}));
|
|
136
|
-
|
|
137
139
|
if (!needDndProvider) {
|
|
138
140
|
return content;
|
|
139
141
|
}
|