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