sard-uniapp 1.11.1 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +2 -1
- package/components/tree/tree.vue +6 -4
- package/components/tree-node/tree-node.vue +9 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [1.11.2](https://github.com/sutras/sard-uniapp/compare/v1.11.1...v1.11.2) (2025-03-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* 修复tree组件递归引用问题 ([25c48b7](https://github.com/sutras/sard-uniapp/commit/25c48b7d57fd178ea9a08688757da41b1394d297))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
## [1.11.1](https://github.com/sutras/sard-uniapp/compare/v1.11.0...v1.11.1) (2025-03-06)
|
|
2
11
|
|
|
3
12
|
|
package/README.md
CHANGED
|
@@ -114,7 +114,8 @@ npm run release
|
|
|
114
114
|
- 修复问题
|
|
115
115
|
- 测试
|
|
116
116
|
- 修改版本号
|
|
117
|
-
-
|
|
117
|
+
- 暂存 `git add .`
|
|
118
|
+
- 提交 `git commit -m 'fix: '`
|
|
118
119
|
- 给提交打标签 `npm run tag`
|
|
119
120
|
- 生成 changelog `npm run changelog`
|
|
120
121
|
- 暂存、提交 changelog `git commit -a -m 'chore: changelog'`
|
package/components/tree/tree.vue
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view :class="treeClass" :style="treeStyle">
|
|
3
|
-
<
|
|
3
|
+
<template v-for="(node, index) of treeData" :key="node.key">
|
|
4
|
+
<sar-tree-node v-if="node.visible" :index="index" :node="node" />
|
|
5
|
+
</template>
|
|
4
6
|
</view>
|
|
5
7
|
|
|
6
8
|
<sar-popover
|
|
@@ -45,7 +47,7 @@ import {
|
|
|
45
47
|
treeContextSymbol,
|
|
46
48
|
defaultTreeProps
|
|
47
49
|
} from "./common";
|
|
48
|
-
import
|
|
50
|
+
import SarTreeNode from "../tree-node/tree-node.vue";
|
|
49
51
|
import SarPopover from "../popover/popover.vue";
|
|
50
52
|
import { usePopover } from "../popover";
|
|
51
53
|
import SarInput from "../input/input.vue";
|
|
@@ -55,7 +57,7 @@ import { useTranslate } from "../locale";
|
|
|
55
57
|
import { recurAncestor, recurDescendant, recurNodes } from "./utils";
|
|
56
58
|
export default _defineComponent({
|
|
57
59
|
components: {
|
|
58
|
-
|
|
60
|
+
SarTreeNode,
|
|
59
61
|
SarPopover,
|
|
60
62
|
SarInput,
|
|
61
63
|
SarDialog,
|
|
@@ -552,7 +554,7 @@ export default _defineComponent({
|
|
|
552
554
|
return currentEditNode;
|
|
553
555
|
}, set currentEditNode(v) {
|
|
554
556
|
currentEditNode = v;
|
|
555
|
-
}, currentEditType, currentEditValue, mapEditTypeTitle, currentEditTitle, dialogVisible, toastVisible, onPopoverSelect, beforeClose, edit, focused, onVisibleHook, defaultFilterMethod, filter, treeClass, treeStyle,
|
|
557
|
+
}, currentEditType, currentEditValue, mapEditTypeTitle, currentEditTitle, dialogVisible, toastVisible, onPopoverSelect, beforeClose, edit, focused, onVisibleHook, defaultFilterMethod, filter, treeClass, treeStyle, SarTreeNode, SarPopover, SarInput, SarDialog, SarToast };
|
|
556
558
|
return __returned__;
|
|
557
559
|
}
|
|
558
560
|
});
|
|
@@ -68,10 +68,13 @@
|
|
|
68
68
|
</view>
|
|
69
69
|
</view>
|
|
70
70
|
|
|
71
|
-
<
|
|
72
|
-
v-if="!isLeaf && node.expanded"
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
<template
|
|
72
|
+
v-if="!isLeaf && node.expanded && node.children && node.children.length > 0"
|
|
73
|
+
>
|
|
74
|
+
<template v-for="(node, index) of node.children" :key="node.key">
|
|
75
|
+
<sar-tree-node v-if="node.visible" :index="index" :node="node" />
|
|
76
|
+
</template>
|
|
77
|
+
</template>
|
|
75
78
|
|
|
76
79
|
<sar-popover
|
|
77
80
|
v-if="treeContext.draggable"
|
|
@@ -99,7 +102,6 @@ import {
|
|
|
99
102
|
treeContextSymbol
|
|
100
103
|
} from "../tree/common";
|
|
101
104
|
import { useMouseDown, useSimulatedClick, useSimulatedPress } from "../../use";
|
|
102
|
-
import SarTreeBranch from "../tree-branch/tree-branch.vue";
|
|
103
105
|
import SarIcon from "../icon/icon.vue";
|
|
104
106
|
import SarCheckbox from "../checkbox/checkbox.vue";
|
|
105
107
|
import SarPopover from "../popover/popover.vue";
|
|
@@ -107,12 +109,12 @@ import { usePopover } from "../popover";
|
|
|
107
109
|
import { getNodeLevel, recurDescendant } from "../tree/utils";
|
|
108
110
|
export default _defineComponent({
|
|
109
111
|
components: {
|
|
110
|
-
SarTreeBranch,
|
|
111
112
|
SarIcon,
|
|
112
113
|
SarCheckbox,
|
|
113
114
|
SarPopover,
|
|
114
115
|
},
|
|
115
116
|
...{
|
|
117
|
+
name: "SarTreeNode",
|
|
116
118
|
options: {
|
|
117
119
|
virtualHost: true,
|
|
118
120
|
styleIsolation: "shared"
|
|
@@ -353,7 +355,7 @@ export default _defineComponent({
|
|
|
353
355
|
return obviousNodes;
|
|
354
356
|
}, set obviousNodes(v) {
|
|
355
357
|
obviousNodes = v;
|
|
356
|
-
}, onDragStart, onDragMove, onDragEnd, onDragSimulatedClickTouchStart, onDragSimulatedClickTouchEnd, onDragSimulatedPressTouchStart, onDragSimulatedPressTouchMove, onDragSimulatedPressTouchEnd, onDragTouchStart, onDragTouchMove, onDragTouchEnd, onDragMouseDown, dragId, popover, isLastNode, popoverOptions, onPopoverSelect, isLeaf, onNodeClick, nodeActive, onNodeTouchStart, onNodeTouchEnd, onNodeMouseDown, onSelectionTouchStart, onSelectionTouchEnd, onSelectionMouseDown, editId, getEditRect, onEditTouchStart, onEditTouchEnd, onEditMouseDown, nodeClass, nodeStyle, editClass, indentStyle, arrowClass, selectionClass,
|
|
358
|
+
}, onDragStart, onDragMove, onDragEnd, onDragSimulatedClickTouchStart, onDragSimulatedClickTouchEnd, onDragSimulatedPressTouchStart, onDragSimulatedPressTouchMove, onDragSimulatedPressTouchEnd, onDragTouchStart, onDragTouchMove, onDragTouchEnd, onDragMouseDown, dragId, popover, isLastNode, popoverOptions, onPopoverSelect, isLeaf, onNodeClick, nodeActive, onNodeTouchStart, onNodeTouchEnd, onNodeMouseDown, onSelectionTouchStart, onSelectionTouchEnd, onSelectionMouseDown, editId, getEditRect, onEditTouchStart, onEditTouchEnd, onEditMouseDown, nodeClass, nodeStyle, editClass, indentStyle, arrowClass, selectionClass, SarIcon, SarCheckbox, SarPopover };
|
|
357
359
|
return __returned__;
|
|
358
360
|
}
|
|
359
361
|
});
|