From 29961bb2bc96a7a0806b92ea45992fa1217dc900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=AF=E7=82=AF?= Date: Mon, 14 Jul 2025 18:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF=E7=94=9F?= =?UTF-8?q?=E6=88=90=E7=9A=84=E4=B8=8A=E4=BC=A0=E6=8E=A7=E4=BB=B6,?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wwwroot/template/service_Service.cs.vm | 2 +- .../wwwroot/template/web_views_editDialog.vue.vm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm index 863d58ac..9d1dd05e 100644 --- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm +++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/service_Service.cs.vm @@ -333,7 +333,7 @@ if(@column.EffectType == "Upload"){ @:public async Task Upload@(@column.PropertyName)([Required] IFormFile file) @:{ @:var service = App.GetRequiredService(); - @:return await service.UploadFile(new UploadFileInput { File = file, Path = "upload/@(@column.PropertyName)" }); + @:return await service.UploadFile(new UploadFileInput { File = file}, "upload/@(@column.PropertyName)" ); @:} } } diff --git a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/web_views_editDialog.vue.vm b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/web_views_editDialog.vue.vm index d131a524..e4f46e1a 100644 --- a/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/web_views_editDialog.vue.vm +++ b/Admin.NET/Admin.NET.Web.Entry/wwwroot/template/web_views_editDialog.vue.vm @@ -435,9 +435,9 @@ if(@column.EffectType == "Upload"){ @:// 上传@(@column.ColumnComment) @:const upload@(@column.PropertyName)Handle = async (options: UploadRequestOptions) => { @if (@Model.IsApiService) { - @:let res = await getAPI(@(@Model.ClassName)Api).api@(@Model.ClassName)Upload@(@column.FkEntityName)PostForm(options); + @:let res = await getAPI(@(@Model.ClassName)Api).api@(@Model.ClassName)Upload@(@column.PropertyName)PostForm(options.file); } else { - @:let res = await upload@(@column.PropertyName)(options); + @:let res = await upload@(@column.PropertyName)(options.file); } @:state.ruleForm.@(column.LowerPropertyName) = res.data.result?.url; @:};