Skip to content

Commit

Permalink
v1.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyu.yang committed Jul 14, 2020
1 parent 4cf067c commit 4759a6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vs-tree",
"version": "1.3.6",
"version": "1.3.7",
"description": "vs-tree component for Vue",
"keywords": [
"Organize contacts",
Expand Down
6 changes: 3 additions & 3 deletions packages/tree/src/model/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ export default class Node {

expand(callback, expandParent, expandedOnlyLoad, noexpand) {
const done = (onlyLoad) => {
if (noexpand) return;
if (expandParent && !onlyLoad) {
if (noexpand || onlyLoad) return;
if (expandParent) {
let parent = this.parent;
while (parent.level > 0) {
parent.expanded = true;
parent = parent.parent;
}
}
this.expanded = !onlyLoad;
this.expanded = true;
if (callback) callback();
};

Expand Down
2 changes: 1 addition & 1 deletion packages/tree/src/tree-node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
this.tree.store.checkMax(this.node, value).then(() => {
this.node.setChecked(ev.target.checked, !this.tree.checkStrictly);
this.node.isCheckLoading = true;
!this.expanded && value && !this.node.isLeaf && this.node.expand(()=>{}, false, false, true);
!this.expanded && value && !this.node.isLeaf && this.node.expand(null, false, false, true);
this.$nextTick(() => {
const store = this.tree.store;
this.tree.$emit('check', this.node.data, {
Expand Down

0 comments on commit 4759a6d

Please sign in to comment.