Commit 82c22ffd authored by Li MingZhe's avatar Li MingZhe

feat: 修改背景色

parent 1f9f265c
No preview for this file type
......@@ -14,6 +14,13 @@
</app-custom-hot-zone>
<div style="display: flex; align-items: center; margin-top: 20px;">
<h4> 背景色选择: </h4>
<nz-select [ngModel]="item.bgColorId" style="width: 120px; margin-left: 20px;" (ngModelChange)="saveBgColor($event)">
<nz-option *ngFor="let c of bgColorArr; let i = index" [nzValue]="i" [nzLabel]="c.text" ></nz-option>
</nz-select>
</div>
<div style="margin-top: 30px;">
......
......@@ -21,6 +21,14 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
picArr;
bgColorArr = [
{color: '#f9bd03', text: '橙色'},
{color: '#0000ff', text: '蓝色'},
{color: '#00ff00', text: '绿色'},
];
bgColor;
customTypeGroupArr = [
{
......@@ -59,6 +67,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.changeDetectorRef.detectChanges();
this.refresh();
console.log('data: ', data);
}, this.saveKey);
}
......@@ -165,6 +175,13 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
this.save();
}
saveBgColor(i) {
console.log(' in saveBgClor: ', this.bgColor);
this.item.bgColorId = i;
this.item.bgColor = this.bgColorArr[i].color;
this.save();
}
/**
* 储存数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment