WIP
This commit is contained in:
parent
6e8cb3c8b6
commit
4465f06b73
@ -15,6 +15,9 @@
|
|||||||
<p>
|
<p>
|
||||||
<b-input placeholder="Text hlavy" v-model="text" type="textarea"></b-input>
|
<b-input placeholder="Text hlavy" v-model="text" type="textarea"></b-input>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
a
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -54,6 +57,20 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return this.text
|
return this.text
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
textOut: function () {
|
||||||
|
return this.text
|
||||||
|
},
|
||||||
|
titleOut: function () {
|
||||||
|
return this.title
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
titleOut: function (oldVal,newVal) {
|
||||||
|
this.$emit('update:title', newVal)
|
||||||
|
},
|
||||||
|
textOut: function (oldVal,newVal) {
|
||||||
|
this.$emit('update:text', newVal)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,9 @@
|
|||||||
{{ zaloba.title }}
|
{{ zaloba.title }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Hlava v-for="hlava in zaloba.hlavy" :key="hlava.nazev" v-bind:title="hlava.nazev" v-bind:text="hlava.text" />
|
<Hlava v-for="hlava in zaloba.hlavy" :key="hlava.nazev" v-bind:title.sync="hlava.nazev" v-bind:text.sync="hlava.text" />
|
||||||
</div>
|
</div>
|
||||||
<b-button type="is-light" class="mt-3" expanded>+</b-button>
|
<b-button type="is-light" class="mt-3" v-on:click="addHlava" expanded>+</b-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -74,6 +74,11 @@ export default {
|
|||||||
NavBar,
|
NavBar,
|
||||||
Hlava
|
Hlava
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
addHlava: function () {
|
||||||
|
this.zaloba.hlavy.push({"title":"","text":""})
|
||||||
|
}
|
||||||
|
},
|
||||||
data: () => {
|
data: () => {
|
||||||
return {
|
return {
|
||||||
zaloba: {
|
zaloba: {
|
||||||
|
Loading…
Reference in New Issue
Block a user