Commit 92073324 authored by lixy's avatar lixy

通用设置:富文本编辑

parent 1d154180
......@@ -57,9 +57,17 @@
<el-form-item label="标识" prop="type">
<el-input type="number" v-model.number="dialogFrom.type" placeholder="1,2,3……"></el-input>
</el-form-item>
<el-form-item label="详情">
<Editor @input="handelIncrease" :value="dialogFrom.value" :myQuillEditor="'myQuillEditorContent'"></Editor>
</el-form-item>
<el-tabs v-model="activeName2" type="card">
<el-tab-pane label="详情" name="first">
<!--<Editor v-if="activeName2=='first'" @input="handelContentIncrease" :value="form.content" :myQuillEditor="'myQuillEditorContent'" :activeName2="activeName2"></Editor>-->
<div class="editor-container" v-if="activeName2=='first'">
<UE :editorId="activeName2" :defaultMsg="dialogFrom.value" :config=config ref="ue" @ready="editorReadyEvent"></UE>
</div>
</el-tab-pane>
</el-tabs>
<!--<el-form-item label="详情">-->
<!--<Editor @input="handelIncrease" :value="dialogFrom.value" :myQuillEditor="'myQuillEditorContent'"></Editor>-->
<!--</el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelHandel">取 消</el-button>
......@@ -76,7 +84,8 @@
</style>
<script>
import 'static/css/uploadImg.css';// 引入图片上传组件对话框
import Editor from "../modal/editorTool";//富文本
// import Editor from "../modal/editorTool";//富文本
import UE from '../modal/Ueditor';//百度ue富文本
import {
formatDate
} from 'utils/dateFormattor';
......@@ -112,7 +121,8 @@
ElCol,
ElRow,
Element1,
Editor
UE
// Editor
},
data() {
return {
......@@ -120,7 +130,12 @@
page: 1,
limit: 20
},
config: {
initialFrameWidth: null,
initialFrameHeight: 350
},
tableKey:0,
activeName2: "",
modalTitle: "创建",
BASE_API: process.env.BASE_API,
dialogVisible: false,//添加、编辑弹框
......@@ -196,6 +211,7 @@
handleUpdate(row) {
this.modalTitle = '编辑';
this.dialogVisible = true;
this.activeName2 = "first";
this.cleanDialogFrom();
this.dialogFrom = row;
},
......@@ -319,12 +335,16 @@
});
},
/**
* 富文本内容
* @param step
*/
handelIncrease(step) {
this.dialogFrom.value = step;
}
* 富文本 营地详情
* */
editorReadyEvent(instance){
let t = this;
instance.addListener('contentChange', () => {
if(t.activeName2 == "first"){
t.dialogFrom.value = instance.getContent();
}
});
},
}
}
</script>
This source diff could not be displayed because it is too large. You can view the blob instead.
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