Skip to content

Commit 12b3240

Browse files
author
yinquan
committed
add the autoReload property
1 parent 0237d4c commit 12b3240

File tree

13 files changed

+152
-8
lines changed

13 files changed

+152
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.10.0
2+
- added:
3+
- the autoReload property
4+
15
2.9.0
26
- security:
37
- upgraded some dependencies.
@@ -20,7 +24,7 @@
2024
- the reload() method caused mutations of the tree property.
2125

2226
2.4.0
23-
- added
27+
- added:
2428
- prop 'fnAfterCalculate(node)'
2529
- fixed:
2630
- the title slot didn't work.

CHANGELOG.zh.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.10.0
2+
- 添加
3+
- 属性 'autoReload'
4+
15
2.9.0
26
- 安全性:
37
- 升级一些依赖包。

docs/css/app.9cada475.css renamed to docs/css/app.47f2b44d.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.9cada475.css" rel="preload" as="style"><link href="js/app.0422c7c4.js" rel="preload" as="script"><link href="js/chunk-vendors.875f16f0.js" rel="preload" as="script"><link href="css/app.9cada475.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.875f16f0.js"></script><script src="js/app.0422c7c4.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.47f2b44d.css" rel="preload" as="style"><link href="js/app.ce62dabf.js" rel="preload" as="script"><link href="js/chunk-vendors.875f16f0.js" rel="preload" as="script"><link href="css/app.47f2b44d.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.875f16f0.js"></script><script src="js/app.ce62dabf.js"></script></body></html>

docs/js/app.0422c7c4.js

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

docs/js/app.0422c7c4.js.map

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

docs/js/app.ce62dabf.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.ce62dabf.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.

example/router/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import MultiSelectExample from '../views/MultiSelectExample.vue'
1010
import RadioButtonExample from '../views/RadioButtonExample.vue'
1111
import SortExample from '../views/SortExample.vue'
1212
import ReloadExample from '../views/ReloadExample.vue'
13+
import AutoReloadExample from '../views/AutoReloadExample.vue'
1314

1415
import GettingStartedDisplayATreeExample from '../views/GettingStartedDisplayATreeExample.vue'
1516
import GettingStartedBasicOperationsExample from '../views/GettingStartedBasicOperationsExample.vue'
@@ -100,6 +101,11 @@ const routes = [
100101
name: 'reload-example',
101102
component: ReloadExample
102103
},
104+
{
105+
path: '/:lang/example/auto-reload',
106+
name: 'auto-reload-example',
107+
component: AutoReloadExample
108+
},
103109

104110
{
105111
path: '/:lang/example/getting-started/display-a-tree',
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<template>
2+
<div class="example-wrapper">
3+
<div class="panel">
4+
<TWTree
5+
ref="tree"
6+
:autoReload="false"
7+
:tree="tree"
8+
class="tree" />
9+
</div>
10+
</div>
11+
</template>
12+
13+
<script>
14+
import TWTree from '../../src/TWTree.vue'
15+
16+
export default {
17+
name: 'auto-reload-example',
18+
components: {
19+
TWTree
20+
},
21+
data() {
22+
return {
23+
autoId: 100,
24+
tree: [
25+
{
26+
id: 1,
27+
title: 'ROOT',
28+
hasChild: true,
29+
children: [
30+
{
31+
id: 2,
32+
title: 'child 1',
33+
},
34+
{
35+
id: 3,
36+
title: 'child 2',
37+
hasChild: true,
38+
children: [
39+
{
40+
id: 4,
41+
title: 'child 2-1'
42+
},
43+
{
44+
id: 5,
45+
title: 'child 2-2'
46+
},
47+
{
48+
id: 6,
49+
title: 'child 2-3'
50+
}
51+
],
52+
},
53+
{
54+
id: 7,
55+
title: 'child 3'
56+
},
57+
{
58+
id: 8,
59+
title: 'child 4'
60+
}
61+
]
62+
}
63+
]
64+
65+
}
66+
},
67+
mounted () {
68+
this.tree[0].title = 'hello, world!'
69+
}
70+
}
71+
</script>
72+
73+
<style scoped>
74+
.panel .tree {
75+
width: 50%;
76+
}
77+
</style>

0 commit comments

Comments
 (0)