From 9fbc3f86eff4637f85338253b41cdb856d10cffb Mon Sep 17 00:00:00 2001 From: wutong25 Date: Thu, 17 Aug 2023 19:10:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=8B=E4=BB=B6=E5=8A=A8=E4=BD=9C?= =?UTF-8?q?=E4=B8=ADdownload=E5=85=BC=E5=AE=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/amis-core/src/actions/Action.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/amis-core/src/actions/Action.ts b/packages/amis-core/src/actions/Action.ts index 71043182c..fa9018d4e 100644 --- a/packages/amis-core/src/actions/Action.ts +++ b/packages/amis-core/src/actions/Action.ts @@ -97,6 +97,7 @@ const getOmitActionProp = (type: string) => { omitList = ['msg', 'title']; break; case 'ajax': + case 'download': omitList = ['api', 'messages', 'options']; break; case 'setValue': @@ -263,7 +264,7 @@ export const runAction = async ( } else if (action.actionType === 'drawer') { action.drawer = {...(action.drawer ?? action.args?.drawer)}; delete action.args?.drawer; - } else if (action.actionType === 'ajax') { + } else if (['ajax', 'download'].includes(action.actionType)) { const api = action.api ?? action.args?.api; action.api = typeof api === 'string' ? api : {...api}; action.options = {...(action.options ?? action.args?.options)};