diff --git a/src/views/content/article/edit.vue b/src/views/content/article/edit.vue
index d7d898e..cd6c905 100644
--- a/src/views/content/article/edit.vue
+++ b/src/views/content/article/edit.vue
@@ -50,6 +50,14 @@
支持扩展名: jpg png jpeg;文件大小不超过200M
+
+
+
@@ -81,6 +89,7 @@ import {computed, onMounted,ref,shallowRef,reactive } from "vue";
import {FormInstance} from "element-plus";
const formRef = shallowRef();
import UploadImg from "@/components/Upload/Image.vue";
+import UploadImgs from '@/components/Upload/Images.vue';
import {useLockFn} from "@/utils/useLockFn";
import Editor from '@/components/Editor/tinymce.vue'
import {message,buildTree} from "@/utils/auth";
@@ -116,11 +125,15 @@ const formData = reactive({
title: "",
author: "",
cover:'',
+ images: '',
intro:'',
content:'',
status:0,
click:'',
- sort:0
+ sort:0,
+ imagesList:[],
+ filePath:'',
+ fileList:[],
});
const dialogClose = () => {
@@ -135,12 +148,29 @@ const setFormData = async (row: any) => {
}
}
editorRef.value.myValue=formData.content
+ // 文章图集
+ if (formData.imagesList) {
+ formData.imagesList.map(item=>{
+ formData.fileList.push({
+ filePath:item
+ })
+ })
+ }
};
const editorRef=ref()
+const fileUploads = (list: any) => {
+ formData.fileList = list
+};
+
const handleSubmit = async () => {
await formRef.value?.validate();
+ // 文章图集处理,多个图片逗号分割
+ formData.images =''
+ formData.fileList.map((item,index)=>{
+ formData.images+=`${item.filePath}${index
- formData.fileName=name"
- :fileType=" ['image/jpeg', 'image/png', 'image/jpg', 'image/gif']"
- name="config"
- :fileSize="200"
- v-model:image-url="formData.filePath">
- 支持扩展名: jpg png jpeg;文件大小不超过200M
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ formData.fileName=name"
+ :fileType=" ['image/jpeg', 'image/png', 'image/jpg', 'image/gif']"
+ name="config"
+ :fileSize="200"
+ v-model:image-url="formData.filePath">
+ 支持扩展名: jpg png jpeg;文件大小不超过200M
+
+
+
+
+
+
+
+
+
+
+
+
+
+