| | |
| | | <template> |
| | | <div> |
| | | <el-upload |
| | | :action="upload.url" |
| | | :before-upload="handleBeforeUpload" |
| | | :on-success="handleUploadSuccess" |
| | | :on-error="handleUploadError" |
| | | class="editor-img-uploader" |
| | | name="file" |
| | | :show-file-list="false" |
| | | :headers="upload.headers" |
| | | style="display: none" |
| | | v-if="type === 'url'" |
| | | > |
| | | </el-upload> |
| | | <div class="editor"> |
| | | <quill-editor |
| | | ref="myQuillEditor" |
| | | v-model:content="content" |
| | | contentType="html" |
| | | @textChange="(e: any) => $emit('update:modelValue', content)" |
| | | :options="options" |
| | | :style="styles" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { QuillEditor, Quill } from '@vueup/vue-quill'; |
| | | import '@vueup/vue-quill/dist/vue-quill.snow.css'; |
| | |
| | | proxy?.$modal.msgError('上传文件失败'); |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-upload |
| | | :action="upload.url" |
| | | :before-upload="handleBeforeUpload" |
| | | :on-success="handleUploadSuccess" |
| | | :on-error="handleUploadError" |
| | | class="editor-img-uploader" |
| | | name="file" |
| | | :show-file-list="false" |
| | | :headers="upload.headers" |
| | | style="display: none" |
| | | v-if="type === 'url'" |
| | | > |
| | | </el-upload> |
| | | <div class="editor"> |
| | | <quill-editor |
| | | ref="myQuillEditor" |
| | | v-model:content="content" |
| | | contentType="html" |
| | | @textChange="(e: any) => $emit('update:modelValue', content)" |
| | | :options="options" |
| | | :style="styles" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style> |
| | | .editor, .ql-toolbar { |