Commit 284f851f authored by FE-安焕焕's avatar FE-安焕焕 👣

编辑器传值

parent 87943b08
<template>
<div>
<textarea id="editor" rows="10" cols="80"></textarea>
<textarea id="editor" rows="10" cols="80" v-model='value'></textarea>
</div>
</template>
<script type="text/ecmascript-6">
......@@ -23,6 +23,10 @@
},
tokenUrl: {
default: ''
},
value: {
require: true,
default: ''
}
},
data() {
......@@ -35,7 +39,6 @@
},
computed: {},
methods: {
init () {
CKEDITOR.replace('editor', {
height: this.height,
......
......@@ -2,7 +2,7 @@
<div>
<!-- bidirectional data binding(双向数据绑定) -->
<Modal v-model='modal' fullscreen>
<editor @getValue='getInfo' :uploadUrl='uploadUrl'></editor>
<editor @getValue='getInfo' :uploadUrl='uploadUrl' :value='value'></editor>
<div slot='footer'>
<Button @click='getInfo'>获取内容</Button>
......@@ -20,6 +20,7 @@
content: '<h2>I am Example</h2>',
content1: '<h2>I am Example</h2>',
uploadUrl: '',
value: '22',
editorOption: {
// some quill options
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment