mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 11:07:52 +08:00
[amis-saas-7686]:跳转和打开页面动作配置后提交报forEach错误
Change-Id: I9643aca9f9dabeaf40ebf2b448f93b2478beb99a
This commit is contained in:
parent
52bfa124bf
commit
4c93c869b6
@ -1008,7 +1008,7 @@ const objectToComboArray = (obj: PlainObject) =>
|
||||
*/
|
||||
const comboArrayToObject = (arr: any[]) => {
|
||||
let obj: PlainObject = {};
|
||||
arr.forEach(item => {
|
||||
arr?.forEach(item => {
|
||||
obj[item.key] = item.val;
|
||||
});
|
||||
|
||||
@ -1344,10 +1344,13 @@ export const getEventControlConfig = (
|
||||
|
||||
// 转换下格式
|
||||
if (['link', 'url'].includes(action.actionType)) {
|
||||
action.args = {
|
||||
...action.args,
|
||||
params: comboArrayToObject(config.args?.params)
|
||||
};
|
||||
const params = config.args?.params;
|
||||
if (params && params.length) {
|
||||
action.args = {
|
||||
...action.args,
|
||||
params: comboArrayToObject(params)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// 转换下格式
|
||||
|
Loading…
Reference in New Issue
Block a user