mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 04:28:32 +08:00
Combo 下 Table 支持服务端校验 (#1432)
This commit is contained in:
parent
764e7af55c
commit
56fa20ed27
@ -290,7 +290,7 @@ export const FormStore = ServiceStore.named('FormStore')
|
|||||||
const items = getItemsByPath(key);
|
const items = getItemsByPath(key);
|
||||||
|
|
||||||
if (Array.isArray(items) && items.length) {
|
if (Array.isArray(items) && items.length) {
|
||||||
items.forEach(item => item.setError(errors[key]));
|
items.forEach(item => item.setError(`${errors[key]}`));
|
||||||
delete errors[key];
|
delete errors[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,6 +212,11 @@ export const FormItemStore = StoreNode.named('FormItemStore')
|
|||||||
});
|
});
|
||||||
|
|
||||||
return selectedOptions;
|
return selectedOptions;
|
||||||
|
},
|
||||||
|
getItemsByName(name: string): any {
|
||||||
|
return (this as any).type === 'table'
|
||||||
|
? [this.subFormItems[name]]
|
||||||
|
: [this];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user