From 114c9f3af68d64156ec2988bab8e8cc65e40fa7b Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Sun, 11 Jul 2021 19:30:24 +0800
Subject: [PATCH] 菜单路由配置支持内链访问
---
ruoyi-ui/src/components/Editor/index.vue | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ruoyi-ui/src/components/Editor/index.vue b/ruoyi-ui/src/components/Editor/index.vue
index 6cb82a1..d4f0ba0 100644
--- a/ruoyi-ui/src/components/Editor/index.vue
+++ b/ruoyi-ui/src/components/Editor/index.vue
@@ -9,7 +9,7 @@
:headers="headers"
style="display: none"
ref="upload"
- v-if="this.uploadUrl"
+ v-if="this.type == 'url'"
>
</el-upload>
<div class="editor" ref="editor" :style="styles"></div>
@@ -46,14 +46,15 @@
type: Boolean,
default: false,
},
- /* 上传地址 */
- uploadUrl: {
+ /* 类型(base64格式、url格式) */
+ type: {
type: String,
- default: "",
+ default: "url",
}
},
data() {
return {
+ uploadUrl: process.env.VUE_APP_BASE_API + "/file/upload", // 上传的图片服务器地址
headers: {
Authorization: "Bearer " + getToken()
},
@@ -75,7 +76,7 @@
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
[{ align: [] }], // 对齐方式
["clean"], // 清除文本格式
- ["link", "image"] // 链接、图片
+ ["link", "image", "video"] // 链接、图片、视频
],
},
placeholder: "请输入内容",
@@ -119,7 +120,7 @@
const editor = this.$refs.editor;
this.Quill = new Quill(editor, this.options);
// 如果设置了上传地址则自定义图片上传事件
- if (this.uploadUrl) {
+ if (this.type == 'url') {
let toolbar = this.Quill.getModule("toolbar");
toolbar.addHandler("image", (value) => {
this.uploadType = "image";
--
Gitblit v1.9.3