富文本编辑上传图片

This commit is contained in:
2024-05-28 09:44:35 +08:00
parent 11ffa506e5
commit 754c82523d
4 changed files with 31 additions and 3 deletions

View File

@@ -44,7 +44,31 @@
<img width="100%" :src="dataForm.image" alt="" />
</el-dialog>
</el-form-item>
<div style="height: auto;margin-bottom: 80px;">
<el-form-item label="内容" prop="url">
<el-upload
class="chapter-avatar-uploader"
:action="baseUrl + '/oss/fileoss'"
accept=".jpeg,.jpg,.gif,.png"
:show-file-list="false"
:on-success="contentUploadSuccess"
>
</el-upload>
<quill-editor
v-model="dataForm.content"
ref="myQuillEditor"
style="height: 400px;"
:options="editorOption"
@blur="onEditorBlur($event)"
@focus="onEditorFocus($event)"
@ready="onEditorReady($event)"
class="chapter_editor"
>
</quill-editor>
</el-form-item>
</div>
<!-- <el-row>
<el-col :span="12">
<el-form-item label="作者" prop="authorId">

View File

@@ -9,8 +9,10 @@
style="height: 100%;"
>
<add-or-update
v-if="currentTab==i"
:dataInfo="v"
:type="type"
:currentTab="currentTab"
style="height: calc(100vh - 180px)"
:ref="`addOrUpdate${v.id}`"
@refreshDataList="getDataList"

View File

@@ -9,8 +9,10 @@
style="height: 100%;"
>
<add-or-update
v-if="currentTab==i"
:dataInfo="v"
:type="type"
:currentTab="currentTab"
style="height: calc(100vh - 180px)"
:ref="`addOrUpdate${v.id}`"
@refreshDataList="getDataList"