Skip to content

Commit

Permalink
fix: 提取公共modal可能会更新错误
Browse files Browse the repository at this point in the history
  • Loading branch information
52flutter committed Mar 4, 2024
1 parent 549a905 commit ad2f95f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from 'amis-editor-core';
import React from 'react';
import {observer} from 'mobx-react';
import {RendererProps, ThemeProps, guid} from 'amis-core';
import {JSONValueMap, RendererProps} from 'amis-core';
import {Button, FormField, InputJSONSchema, Select, Switch} from 'amis-ui';

export interface DialogActionPanelProps extends RendererProps {
Expand Down Expand Up @@ -148,6 +148,13 @@ function DialogActionPanel({
$ref: refKey
})
};

// schema中存在__actionModals 直接更新Id会更新到冗余数据__actionModals 先去除再更新
JSONValueMap(schema, (value, key, host: any) => {
if (key === '__actionModals') {
host[key] = undefined;
}
});
// 原来的动作也要更新
schema = JSONUpdate(
schema,
Expand Down

0 comments on commit ad2f95f

Please sign in to comment.