|
|
@ -16,21 +16,30 @@ |
|
|
|
</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> |
|
|
|
</template> |
|
|
|
|
|
|
@ -81,4 +90,10 @@ li { |
|
|
|
a { |
|
|
|
color: #42b983; |
|
|
|
} |
|
|
|
|
|
|
|
.treenode { |
|
|
|
border: 1px solid; |
|
|
|
border-color: "black"; |
|
|
|
margin: 5px; |
|
|
|
} |
|
|
|
</style> |
|
|
|