This commit is contained in:
闫晓茹 2023-04-27 17:00:01 +08:00
parent 0f78ff4272
commit 660a0d4c5b

View File

@ -9,10 +9,10 @@
:show-file-list="false"
:headers="headers"
style="display: none"
:data="filetype"
ref="upload"
v-if="this.type == 'url'"
>
</el-upload>
></el-upload>
<div class="editor" ref="editor" :style="styles"></div>
</div>
</template>
@ -57,10 +57,18 @@ export default {
type: String,
default: "url",
},
url: {
type: String,
default: "/common/richTextPictureUrl",
},
// filetypes: {
// type: String,
// default: "",
// },
},
data() {
return {
uploadUrl: process.env.VUE_APP_BASE_API + "/common/richTextPictureUrl", //
uploadUrl: process.env.VUE_APP_BASE_API, //
headers: {
Authorization: "Bearer " + getToken(),
},
@ -82,14 +90,22 @@ export default {
[{ color: [] }, { background: [] }], //
[{ align: [] }], //
["clean"], //
["link", "image", "video"], //
["link", "image"], //
],
},
placeholder: "请输入内容",
readOnly: this.readOnly,
},
filetype: {
type: "",
},
};
},
created() {
this.uploadUrl = process.env.VUE_APP_BASE_API + this.url;
// console.log(this.url)
// this.filetype.type = this.filetypes;
},
computed: {
styles() {
let style = {};
@ -181,9 +197,8 @@ export default {
"image",
process.env.VUE_APP_BASE_API + res.fileName
);
console.log(res);
this.$emit("imgs", res.fileName);
//
quill.setSelection(length + 1);
} else {