diff --git a/ebts-ui/src/components/Editor/index.vue b/ebts-ui/src/components/Editor/index.vue
index 1cf2f82..80ba2f3 100644
--- a/ebts-ui/src/components/Editor/index.vue
+++ b/ebts-ui/src/components/Editor/index.vue
@@ -89,6 +89,7 @@ export default {
init () {
const _this = this
this.editor = new Editor(this.$refs.editor)
+ this.editor.config.uploadImgAccept = ['doc', 'docx', 'png', 'gif', 'bmp', 'webp']
this.editor.config.uploadImgShowBase64 = true // 使用 base64 保存图片
this.editor.config.height = this.height
this.editor.config.pasteFilterStyle = false
diff --git a/ebts-ui/src/components/FileUpload/index.vue b/ebts-ui/src/components/FileUpload/index.vue
index e77d32b..3ffbd59 100644
--- a/ebts-ui/src/components/FileUpload/index.vue
+++ b/ebts-ui/src/components/FileUpload/index.vue
@@ -43,7 +43,6 @@ import { getToken } from "@/utils/auth";
export default {
props: {
-
// 值
value: [String, Object, Array],
// 大小限制(MB)
@@ -141,7 +140,7 @@ export default {
handleUploadSuccess(res, file) {
this.$message.success("提交成功!");
this.$emit("input", res.url);
- this.$emit("change",res.fileName);
+ this.$emit("change",res);
},
// 删除文件
handleDelete(index) {
diff --git a/ebts-ui/src/store/modules/user.js b/ebts-ui/src/store/modules/user.js
index 01106cb..f92f602 100644
--- a/ebts-ui/src/store/modules/user.js
+++ b/ebts-ui/src/store/modules/user.js
@@ -59,6 +59,7 @@ const user = {
const avatar = user.avatar == "" ? require("@/assets/image/profile.jpg") : user.avatar;
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
commit('SET_ROLES', res.roles)
+ sessionStorage.setItem("roles",JSON.stringify(user.roles))
commit('SET_PERMISSIONS', res.permissions)
} else {
commit('SET_ROLES', ['ROLE_DEFAULT'])
diff --git a/ebts-ui/src/views/sist/article/components/ArticleFile.vue b/ebts-ui/src/views/sist/article/components/ArticleFile.vue
new file mode 100644
index 0000000..79d4d4e
--- /dev/null
+++ b/ebts-ui/src/views/sist/article/components/ArticleFile.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+ 选取文件
+ 只能上传jpg/png文件,且不超过500kb
+
+
+
+
+
+
+
diff --git a/ebts-ui/src/views/sist/article/components/article.vue b/ebts-ui/src/views/sist/article/components/article.vue
index d2307bb..e7c72ba 100644
--- a/ebts-ui/src/views/sist/article/components/article.vue
+++ b/ebts-ui/src/views/sist/article/components/article.vue
@@ -105,6 +105,26 @@
+
+
+
+
+
+ 选取文件
+ 只能上传jpg/png文件,且不超过500kb
+
+
+
+
@@ -122,20 +142,31 @@