Skip to content

Commit e80d61b

Browse files
committed
fix(BaseTree): fix parma error of querySelector
affects: @he-tree/vue2, @he-tree/vue3
1 parent b3dfdf0 commit e80d61b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/vue2/src/BaseTree.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export default class BaseTree extends Vue {
153153
return this.nodesByID[id!];
154154
}
155155
getElByID(id: string | number): HTMLElement | undefined {
156-
return this.$el.querySelector(`[data-id=${id}]`) as HTMLElement;
156+
return this.$el.querySelector(`[data-id="${id}"]`) as HTMLElement;
157157
}
158158
getParent(node?: Node) {
159159
if (!node) {

packages/vue3/src/BaseTree.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default defineComponent({
176176
return this.nodesByID[id!];
177177
},
178178
getElByID(id: string | number): HTMLElement | undefined {
179-
return this.$el.querySelector(`[data-id=${id}]`) as HTMLElement;
179+
return this.$el.querySelector(`[data-id="${id}"]`) as HTMLElement;
180180
},
181181
getParent(node?: Node) {
182182
if (!node) {

0 commit comments

Comments
 (0)