You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
<template>
|
|
<div>
|
|
<div class="kit__field field">
|
|
<div class="field__wrap field__wrap--title">
|
|
<input type="text"
|
|
:value="title"
|
|
class="field__input"
|
|
placeholder="Заголовок раздела"
|
|
@change="onTitleChange">
|
|
</div>
|
|
</div>
|
|
<div class="kit__field field">
|
|
<div class="field__wrap">
|
|
<vue-redactor :value="text" v-on:update:value="onTextChange" placeholder="Описание"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import VueRedactor from '../redactor/VueRedactor';
|
|
|
|
export default {
|
|
name: "block-text",
|
|
props: ["index", "title", "text"],
|
|
methods: {
|
|
onTitleChange(event) {
|
|
this.$emit('update:title', event.target.value);
|
|
},
|
|
onTextChange(newValue) {
|
|
this.$emit('update:text', newValue);
|
|
},
|
|
},
|
|
components: {
|
|
'vue-redactor': VueRedactor,
|
|
}
|
|
}
|
|
</script>
|
|
|