forked from tower1229/Vue-Giant-Tree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,972 additions
and
22,663 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,19 @@ | ||
<meta charset="utf-8"> | ||
<title>vue-giant-tree demo</title> | ||
<script src="https://unpkg.com/vue"></script> | ||
<script src="//unpkg.com/vue@2"></script> | ||
<script src="./vue-giant-tree.umd.js"></script> | ||
|
||
|
||
<div id="app"> | ||
<demo :nodes="simpleData" /> | ||
<demo></demo> | ||
</div> | ||
|
||
<script> | ||
const vueGiantTree = window['vue-giant-tree'] | ||
|
||
const simpleData = [ | ||
{ id: 1, pid: 0, name: "随意勾选 1", open: true }, | ||
{ id: 11, pid: 1, name: "随意勾选 1-1", open: true }, | ||
{ id: 111, pid: 11, name: "随意勾选 1-1-1" }, | ||
{ id: 112, pid: 11, name: "随意勾选 1-1-2" }, | ||
{ id: 12, pid: 1, name: "随意勾选 1-2", open: true }, | ||
{ id: 121, pid: 12, name: "随意勾选 1-2-1" }, | ||
{ id: 122, pid: 12, name: "随意勾选 1-2-2" }, | ||
{ id: 2, pid: 0, name: "随意勾选 2", checked: true, open: true }, | ||
{ id: 21, pid: 2, name: "随意勾选 2-1" }, | ||
{ id: 22, pid: 2, name: "随意勾选 2-2", open: true }, | ||
{ id: 221, pid: 22, name: "随意勾选 2-2-1", checked: true }, | ||
{ id: 222, pid: 22, name: "随意勾选 2-2-2" }, | ||
{ id: 23, pid: 2, name: "随意勾选 2-3" } | ||
]; | ||
new Vue({ | ||
components: { | ||
demo: vue-giant-tree | ||
} | ||
}).$mount('#app') | ||
|
||
|
||
new Vue({ | ||
data() { | ||
return { | ||
simpleData | ||
} | ||
}, | ||
components: { | ||
demo: vueGiantTree | ||
} | ||
}).$mount('#app') | ||
</script> | ||
</script> |
Oops, something went wrong.