Commit 92073324 authored by lixy's avatar lixy

通用设置:富文本编辑

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