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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-if="item.children.length > 0 && item.children[0].appendable_siblings.length > 0">
|
||||||
<h1>Vložit před</h1>
|
<b>Vložit před</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="chld in item.appendable_children" :key="chld[0]">
|
<li v-for="sibl in item.children[0].appendable_siblings" :key="sibl[0]">
|
||||||
<a href="">{{chld[1]}}</a>
|
<a href="">{{sibl[1]}}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<ul>
|
<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 :item="chld">
|
||||||
</TreeNode>
|
</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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -81,4 +90,10 @@ li {
|
||||||
a {
|
a {
|
||||||
color: #42b983;
|
color: #42b983;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.treenode {
|
||||||
|
border: 1px solid;
|
||||||
|
border-color: "black";
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue