TreeNode editor | pridavani novych nodu (WIP)
This commit is contained in:
parent
4a3454e2e4
commit
ba9f869193
1 changed files with 21 additions and 6 deletions
|
@ -16,22 +16,31 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<h1>Vložit před</h1>
|
||||
<div v-if="item.children.length > 0 && item.children[0].appendable_siblings.length > 0">
|
||||
<b>Vložit před</b>
|
||||
<ul>
|
||||
<li v-for="chld in item.appendable_children" :key="chld[0]">
|
||||
<a href="">{{chld[1]}}</a>
|
||||
<li v-for="sibl in item.children[0].appendable_siblings" :key="sibl[0]">
|
||||
<a href="">{{sibl[1]}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<li v-for="chld in item.children" v-bind:key="chld.nazev" >
|
||||
<li v-for="(chld, index) in item.children" v-bind:key="chld.nazev" >
|
||||
<TreeNode :item="chld">
|
||||
</TreeNode>
|
||||
<div v-if="chld.appendable_siblings.length > 0">
|
||||
<b v-if="index < (item.children.length - 1)">Vložit mezi</b>
|
||||
<b v-else>Vložit za</b>
|
||||
<ul>
|
||||
<li v-for="sibl in chld.appendable_siblings" :key="sibl[0]">
|
||||
<a href="">{{sibl[1]}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -81,4 +90,10 @@ li {
|
|||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
|
||||
.treenode {
|
||||
border: 1px solid;
|
||||
border-color: "black";
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue