提交 b200ec25 编写于 作者: RedPig97's avatar RedPig97

update:表格值规则

上级 d70a2026
......@@ -2,4 +2,7 @@
.ant-form-item-label {
width: 130px;
}
.ant-form-item-explain-success {
color: red;
}
}
\ No newline at end of file
......@@ -202,9 +202,9 @@ export const ctrlState = {
{{#each ctrl.psDEGridEditItems as | editItem |}}
{{#eq editItem.codeName ruleItem.psDEGridEditItemName}}
{
validator: (rule: any, value: any, callback: any, source: any) => {
validator: async (rule: any, value: any, callback: any, source: any) => {
if (!source || isEmpty(source['{{#if editItem.valueItemName}}{{editItem.valueItemName}}{{else}}{{ruleItem.psDEGridEditItemName}}{{/if}}'])) {
return true;
return Promise.resolve();
}
const { isPast, infoMessage } = Verify.verifyDeRules(
'{{#if editItem.valueItemName}}{{editItem.valueItemName}}{{else}}{{ruleItem.psDEGridEditItemName}}{{/if}}',
......@@ -214,7 +214,7 @@ export const ctrlState = {
if (!isPast) {
callback(new Error(infoMessage || '{{ruleItem.psDEFValueRule.ruleInfo}}'));
}
return true;
return Promise.resolve();
},
trigger: ['change', 'blur']
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册