WIP
This commit is contained in:
parent
6e8cb3c8b6
commit
4465f06b73
@ -15,6 +15,9 @@
|
||||
<p>
|
||||
<b-input placeholder="Text hlavy" v-model="text" type="textarea"></b-input>
|
||||
</p>
|
||||
<p>
|
||||
a
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -54,6 +57,20 @@ export default {
|
||||
} else {
|
||||
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 }}
|
||||
</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>
|
||||
<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>
|
||||
</template>
|
||||
@ -74,6 +74,11 @@ export default {
|
||||
NavBar,
|
||||
Hlava
|
||||
},
|
||||
methods: {
|
||||
addHlava: function () {
|
||||
this.zaloba.hlavy.push({"title":"","text":""})
|
||||
}
|
||||
},
|
||||
data: () => {
|
||||
return {
|
||||
zaloba: {
|
||||
|
Loading…
Reference in New Issue
Block a user