| | |
| | | <span v-else>{{state.form.pubDate}}</span> |
| | | </el-form-item> |
| | | <el-form-item label="内容:" v-if="showEditor" required> |
| | | <we-editor ref="myEditor" :propData="state.form.content" @childFn="getEditorData" /> |
| | | <!-- <we-editor ref="myEditor" :propData="state.form.content" @childFn="getEditorData" />--> |
| | | <t-editor style="width: 800px" ref="myEditor" :value="state.form.content" ></t-editor> |
| | | </el-form-item> |
| | | <el-form-item label="内容:" v-else> |
| | | <div class="ql-container ql-snow" style="height: 500px;width: 100%;margin-top: 10px;" > |
| | |
| | | <script setup> |
| | | import {reactive, ref, toRefs} from 'vue' |
| | | import weEditor from "@/components/WeEditor/index.vue"; |
| | | import TEditor from "@/components/Tinymce/Tinymce.vue" |
| | | import {ElMessage} from "element-plus"; |
| | | import {addLaw, editLaw, getLawDetail} from "@/api/backManage/law"; |
| | | import axios from "axios"; |
| | |
| | | } else { |
| | | this.$message.error('获取文件失败') |
| | | } |
| | | this.handleClose(); |
| | | // this.handleClose(); |
| | | }) |
| | | } |
| | | } |
| | | const onSubmit = async () => { |
| | | myEditor.value.submit(); |
| | | state.form.content = tinyMCE.activeEditor.getContent(); |
| | | const valid = await lawRef.value.validate(); |
| | | if(valid){ |
| | | if(state.form.content == "") { |
| | |
| | | } |
| | | |
| | | const handleClose = () => { |
| | | if(title ==="新增"|| title ==='编辑'){ |
| | | if(title.value ==="新增"|| title.value ==='编辑'){ |
| | | myEditor.value.clear(); |
| | | showEditor.value=false |
| | | |