diff --git a/src/api/business/vote.js b/src/api/business/vote.js index 2716ec8..1965296 100644 --- a/src/api/business/vote.js +++ b/src/api/business/vote.js @@ -75,3 +75,4 @@ export function exportVoteResults(query) { } + diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index c2f6fe7..ec733fd 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -80,7 +80,7 @@ export default { [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 [{ align: [] }], // 对齐方式 ["clean"], // 清除文本格式 - [ "image", "video"] // 链接、图片、视频 "link" + ["link", "image", "video"] // 链接、图片、视频 ], }, placeholder: "请输入内容", @@ -141,14 +141,6 @@ export default { this.quill.format("image", false); } }); - toolbar.addHandler("link", (value) => { - this.uploadType = "link"; - if (value) { - this.$refs.upload.$children[0].$refs.input.click(); - } else { - this.quill.format("link", false); - } - }); } this.Quill.pasteHTML(this.currentValue); this.Quill.on("text-change", (delta, oldDelta, source) => { @@ -191,9 +183,7 @@ export default { let length = quill.getSelection().index; // 插入图片 res.url为服务器返回的图片地址 // edit by 新疆事务通 - console.log(res) - - quill.insertEmbed(length, "a", res.data); + quill.insertEmbed(length, "image", res.data); // 调整光标到最后 quill.setSelection(length + 1); } else { diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index f71d6a0..2da67b9 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -29,10 +29,10 @@
  • - {{ getFileName(file.name) }} + {{ getFileName(file.name) }} -
    - 删除 +
    + 删除
  • @@ -111,6 +111,7 @@ export default { methods: { // 上传前校检格式和大小 handleBeforeUpload(file) { + console.log(file) // 校检文件类型 if (this.fileType) { let fileExtension = ""; @@ -199,6 +200,11 @@ export default {