Tomas "Jethro" Pokorny
4 years ago
7 changed files with 101 additions and 38 deletions
@ -0,0 +1,38 @@ |
|||||
|
<template> |
||||
|
<div class="addnewnode"> |
||||
|
<button v-if="types.includes('castNode')" v-on:click="selected='castNode'" :disabled="selected && selected !== 'castNode'">Část</button> |
||||
|
<button v-if="types.includes('textNode')" v-on:click="selected='textNode'" :disabled="selected && selected !== 'textNode'">Text</button> |
||||
|
<button v-if="types.includes('reseniNode')" v-on:click="selected='reseniNode'" :disabled="selected && selected !== 'reseniNode'">Řešení</button> |
||||
|
<button v-if="types.includes('ulohaZadaniNode')" v-on:click="selected='ulohaZadaniNode'" :disabled="selected && selected !== 'ulohaZadaniNode'">Zadání úlohy</button> |
||||
|
<button v-if="types.includes('ulohaVzorakNode')" v-on:click="selected='ulohaVzorakNode'" :disabled="selected && selected !== 'ulohaVzorakNode'">Vzorák</button> |
||||
|
<div v-if="selected"> |
||||
|
<component :is='selected' :item='null' create></component> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import castNode from './CastNode.vue' |
||||
|
import textNode from './TextNode.vue' |
||||
|
import ulohaZadaniNode from './UlohaZadaniNode.vue' |
||||
|
import ulohaVzorakNode from './UlohaVzorakNode.vue' |
||||
|
//import reseniNode from './UlohaVzorakNode.vue' |
||||
|
|
||||
|
export default { |
||||
|
name: 'AddNewNode', |
||||
|
props: { |
||||
|
types: Array, |
||||
|
where: String |
||||
|
}, |
||||
|
data: () => ({ |
||||
|
selected: null, |
||||
|
cast: 'castnode', |
||||
|
}), |
||||
|
components: { |
||||
|
castNode, |
||||
|
textNode, |
||||
|
ulohaZadaniNode, |
||||
|
ulohaVzorakNode, |
||||
|
} |
||||
|
} |
||||
|
</script> |
Loading…
Reference in new issue