From 60e2d55a2304ed7b973ed7a9bd40f3a6fb242585 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Mon, 21 Apr 2025 13:28:32 +0800
Subject: [PATCH] 优化菜单搜索查询页
---
ruoyi-ui/src/components/FileUpload/index.vue | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/ruoyi-ui/src/components/FileUpload/index.vue b/ruoyi-ui/src/components/FileUpload/index.vue
index 03c3d55..7b4fe12 100644
--- a/ruoyi-ui/src/components/FileUpload/index.vue
+++ b/ruoyi-ui/src/components/FileUpload/index.vue
@@ -5,6 +5,7 @@
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:file-list="fileList"
+ :data="data"
:limit="limit"
:on-error="handleUploadError"
:on-exceed="handleExceed"
@@ -48,6 +49,15 @@
props: {
// 值
value: [String, Object, Array],
+ // 上传接口地址
+ action: {
+ type: String,
+ default: "/file/upload"
+ },
+ // 上传携带的参数
+ data: {
+ type: Object
+ },
// 数量限制
limit: {
type: Number,
@@ -78,7 +88,7 @@
return {
number: 0,
uploadList: [],
- uploadFileUrl: process.env.VUE_APP_BASE_API + "/file/upload", // 上传文件服务器地址
+ uploadFileUrl: process.env.VUE_APP_BASE_API + this.action, // 上传文件服务器地址
headers: {
Authorization: "Bearer " + getToken(),
},
@@ -152,7 +162,7 @@
// 上传失败
handleUploadError(err) {
this.$modal.msgError("上传文件失败,请重试");
- this.$modal.closeLoading()
+ this.$modal.closeLoading();
},
// 上传成功回调
handleUploadSuccess(res, file) {
--
Gitblit v1.9.3