fix(amis-editor): input-table关闭确认模式时,仍然有mock数据

This commit is contained in:
yangwei14 2024-06-13 16:30:16 +08:00 committed by yangwei9012
parent 47866b3e17
commit 5eb473661b

View File

@ -1423,7 +1423,7 @@ export class TableControlPlugin extends BasePlugin {
if (Array.isArray(props.columns)) {
props.columns.forEach((column: any) => {
/** 可编辑状态下不写入 Mock 数据,避免误导用户 */
if (column.name && !props.editable) {
if (column.name && !props.editable && !!props.needConfirm) {
setVariable(mockedData, column.name, mockValue(column));
}
});