This commit is contained in:
Taric Xin
2022-03-23 15:39:58 +08:00
parent f5f64038c2
commit ecea562ed8

View File

@ -51,10 +51,17 @@ export class DynamicSettingH5Component implements OnInit {
return;
}
// 配置校验
if (this.configList.find((config: any) => !config.itemValue && config.requiredField)) {
this.service.msgSrv.warning('请填写必填项');
for (let index = 0; index < this.configList.length; index++) {
const config = this.configList[index];
if (!config.itemValue && config.requiredField) {
this.service.msgSrv.warning(`${config.name}不能为${config.itemValue}`);
return;
}
}
// if (this.configList.find((config: any) => !config.itemValue && config.requiredField)) {
// this.service.msgSrv.warning('请填写必填项');
// return;
// }
let params = [...this.configList];
params = params.map((item: any) => {
if (item.itemType == 9) {