mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: 事件动作中download兼容问题
This commit is contained in:
parent
7ef1842ed2
commit
9fbc3f86ef
@ -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)};
|
||||
|
Loading…
Reference in New Issue
Block a user