1234567891011121314151617181920212223242526272829303132 |
- <template>
- <div>
- <editor :content="content" @on-change="onChange" />
- </div>
- </template>
- <script>
- import editor from './index'
- export default {
- components: {
- editor,
- },
- props: ['data', 'value', 'option', 'error'],
- data () {
- return {
- content: this.value[this.data.keyword],
- }
- },
- methods: {
- onChange (content) {
- this.$hub.$emit(this.data.hub, {
- type: 'value',
- payload: Object.assign(this.value, {
- [this.data.keyword]: content,
- }),
- })
- },
- },
- }
- </script>
|