@v-c/tree 1.0.2 → 1.0.3
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/NodeList.js +1 -1
- package/dist/TreeNode.js +3 -2
- package/package.json +2 -2
package/dist/NodeList.js
CHANGED
|
@@ -2,8 +2,8 @@ import { getKey, getTreeNodeId, getTreeNodeProps } from "./utils/treeUtil.js";
|
|
|
2
2
|
import MotionTreeNode_default from "./MotionTreeNode.js";
|
|
3
3
|
import { findExpandedKeys, getExpandRange } from "./utils/diffUtil.js";
|
|
4
4
|
import { Fragment, computed, createVNode, defineComponent, mergeProps, ref, shallowRef, watch } from "vue";
|
|
5
|
-
import { toPropsRefs } from "@v-c/util/dist/props-util";
|
|
6
5
|
import useId from "@v-c/util/dist/hooks/useId";
|
|
6
|
+
import { toPropsRefs } from "@v-c/util/dist/props-util";
|
|
7
7
|
import VirtualList from "@v-c/virtual-list";
|
|
8
8
|
function itemKey(item) {
|
|
9
9
|
const { key, pos } = item;
|
package/dist/TreeNode.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import Indent_default from "./Indent.js";
|
|
2
2
|
import { TreeContextKey, UnstableContextKey } from "./contextTypes.js";
|
|
3
3
|
import getEntity from "./utils/keyUtil.js";
|
|
4
|
-
import { convertNodePropsToEventData,
|
|
4
|
+
import { convertNodePropsToEventData, isLeafNode } from "./utils/treeUtil.js";
|
|
5
5
|
import { computed, createVNode, defineComponent, inject, mergeProps, ref, watchEffect } from "vue";
|
|
6
6
|
import { clsx } from "@v-c/util";
|
|
7
|
+
import { getId } from "@v-c/util/dist/hooks/useId";
|
|
7
8
|
import pickAttrs from "@v-c/util/dist/pickAttrs";
|
|
8
9
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
9
10
|
var ICON_OPEN = "open";
|
|
@@ -12,7 +13,7 @@ var defaultTitle = "---";
|
|
|
12
13
|
var TreeNode = /* @__PURE__ */ defineComponent((props, { attrs }) => {
|
|
13
14
|
const context = inject(TreeContextKey, null);
|
|
14
15
|
const unstableContext = inject(UnstableContextKey, {});
|
|
15
|
-
const nodeId = computed(() =>
|
|
16
|
+
const nodeId = computed(() => getId(props.treeId || "", `${props.eventKey}`));
|
|
16
17
|
const dragNodeHighlight = ref(false);
|
|
17
18
|
const isDisabled = computed(() => {
|
|
18
19
|
return !!(context.disabled || props.disabled || unstableContext.nodeDisabled?.(props.data));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/tree",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"vue": "^3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@v-c/util": "^1.0.
|
|
32
|
+
"@v-c/util": "^1.0.14",
|
|
33
33
|
"@v-c/virtual-list": "^1.0.5"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|