替换containsAllLable

This commit is contained in:
潘晓云
2022-03-09 16:33:45 +08:00
parent 957a66254f
commit b0a7611ae4
28 changed files with 1365 additions and 1105 deletions

View File

@ -27,7 +27,7 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor {
@Input() params = {};// 请求参数
dictList: any[] = [];
@Input() containsAllLable = true; // 是否包含全部这一选项
@Input() containsAllLabel = true; // 是否包含全部这一选项
@Input() mode: 'multiple' | 'tags' | 'default' = 'default';
@ -55,7 +55,7 @@ export class DictSelectComponent implements OnInit, ControlValueAccessor {
this.service.getDictList(this.url || this.defaultUrl, this.params).subscribe(res => {
if (res) {
this.dictList = res || [];
if (this.dictList.length > 0 && this.containsAllLable) {
if (this.dictList.length > 0 && this.containsAllLabel) {
const obj = { label: '全部', value: '' };
this.dictList.unshift(obj);
}