Skip to content

Commit 2610b97

Browse files
author
yinquan
committed
add the expandAncestors(node) method
1 parent a2212bf commit 2610b97

File tree

10 files changed

+19
-6
lines changed

10 files changed

+19
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
3.3.0
2+
- added:
3+
- the expandAncestors(node) method
4+
15
3.2.0
26
- fixed:
37
- the input box's width didn't fit its content well.

CHANGELOG.zh.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
3.3.0
2+
- 添加:
3+
- 方法 expandAncestor(node)
4+
15
3.2.0
26
- 修正:
37
- 编辑一个结点的标题时,输入框的宽度不能很好地适应内容的长度。

docs/css/app.d4ba7ce3.css renamed to docs/css/app.c01ca9bf.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>twtree</title><link href="css/app.d4ba7ce3.css" rel="preload" as="style"><link href="js/app.945b0e38.js" rel="preload" as="script"><link href="js/chunk-vendors.015f92ae.js" rel="preload" as="script"><link href="css/app.d4ba7ce3.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but twtree doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.015f92ae.js"></script><script src="js/app.945b0e38.js"></script></body></html>
1+
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>twtree</title><link href="css/app.c01ca9bf.css" rel="preload" as="style"><link href="js/app.6fc84d79.js" rel="preload" as="script"><link href="js/chunk-vendors.015f92ae.js" rel="preload" as="script"><link href="css/app.c01ca9bf.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but twtree doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.015f92ae.js"></script><script src="js/app.6fc84d79.js"></script></body></html>

docs/js/app.6fc84d79.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/app.6fc84d79.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/js/app.945b0e38.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/js/app.945b0e38.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "twtree",
3-
"version": "3.2.0",
3+
"version": "3.3.0",
44
"description": "A highly customizable tree component for vue, which features checkbox, async loading, drag and drop, context menu and custom appearance.",
55
"main": "lib/twtree.umd.min.js",
66
"module": "lib/twtree.esm.js",

src/TWTree.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,11 @@ export default {
10051005
this.refresh()
10061006
this.$emit('collapse', node)
10071007
},
1008+
expandAncestors(node) {
1009+
for (let ancestor of node.__.path) {
1010+
this.expand(ancestor)
1011+
}
1012+
},
10081013
getElement(node) {
10091014
let refId = 'node-' + node.id
10101015
if (this.$refs.hasOwnProperty(refId)) {

0 commit comments

Comments
 (0)