mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
fix: 校验输入框删除内容时输入内容闪烁
This commit is contained in:
parent
83fba50e14
commit
b579a44683
@ -156,10 +156,6 @@ export default class ValidationItem extends React.Component<
|
||||
'错误提示',
|
||||
`系统默认提示:${this.validator.message}`
|
||||
),
|
||||
pipeIn: (value: string, data: any) => {
|
||||
// value中 $1 会被运算,导致无法正确回显$1。此处从this.props.data中获取该校验项的错误提示
|
||||
return this.props.data.message;
|
||||
},
|
||||
placeholder: '默认使用系统定义提示'
|
||||
});
|
||||
}
|
||||
@ -185,14 +181,10 @@ export default class ValidationItem extends React.Component<
|
||||
},
|
||||
preventEnterSubmit: true,
|
||||
submitOnChange: true,
|
||||
body: control,
|
||||
data: {value, message}
|
||||
body: control
|
||||
},
|
||||
{
|
||||
data: {
|
||||
...this.props.data,
|
||||
fields
|
||||
},
|
||||
data: {value, message, fields},
|
||||
onSubmit: this.handleEdit
|
||||
}
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user