This commit is contained in:
Taric Xin
2022-02-21 16:22:35 +08:00
parent f5f682b2ed
commit f855154875
10 changed files with 96 additions and 125 deletions

View File

@ -1,3 +1,3 @@
<app-dynamic-setting-h5 [tabs]="tabs" [configList]="configList" [selectedTab]="selectedTab"
(selectedEvent)="getConfigList($event)" (saveEvent)="saveAction($event)">
(selectedEvent)="getConfigList($event)" (saveEvent)="saveAction($event)" [labelWidth]="labelWidth">
</app-dynamic-setting-h5>

View File

@ -1,5 +1,5 @@
/*
* @Description :
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-01-25 13:10:49
@ -21,7 +21,7 @@ import { SystemService } from '../../services/system.service';
export class BasicSettingComponent implements OnInit {
tabs: any[] = [];
selectedTab: any = null;
labelWidth = 250;
configList: any = [];
constructor(public service: SystemService) {}
@ -49,9 +49,11 @@ export class BasicSettingComponent implements OnInit {
res = res.map(item => ({
...item,
remark: item.remark ? JSON.parse(item.remark) : null,
itemValue: item?.itemValue ? item?.itemType !== 8? JSON.parse(item?.itemValue) : item?.itemValue : item?.itemValue,
itemValue: item?.itemValue ? (item?.itemType !== 8 ? JSON.parse(item?.itemValue) : item?.itemValue) : item?.itemValue,
itemData: item.itemData ? JSON.parse(item.itemData) : item.itemData
}));
const hiddenType = res.find(item => item.itemType === 7 || item.itemType === 999);
this.labelWidth = hiddenType ? 0 : 250;
this.configList = res;
} else {
this.configList = [];