提交 f8440175 编写于 作者: 无木

fix(model): auto validate on value change

修复BasicModel的表单值发生变化时未能自动校验

fixed: #920
上级 5baaa585
......@@ -229,6 +229,12 @@
function setFormModel(key: string, value: any) {
formModel[key] = value;
const { validateTrigger } = unref(getBindValue);
if (!validateTrigger || validateTrigger === 'change') {
try {
validateFields([key]);
} catch (e) {}
}
}
function handleEnterPress(e: KeyboardEvent) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册