替换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);
}

View File

@ -8,7 +8,7 @@
-->
<sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">
<app-dict-select [url]="ui?.url" [ngModel]="value" [params]="ui?.params" (ngModelChange)="change($event)"
[containsAllLable]="ui?.containsAllLable" [mode]="ui?.mode" name="sf.dict.select">
[containsAllLabel]="ui?.containsAllLabel" [mode]="ui?.mode" name="sf.dict.select">
</app-dict-select>
</sf-item-wrap>
<!-- <sf-item-wrap [id]="id" [schema]="schema" [ui]="ui" [showError]="showError" [error]="error" [showTitle]="schema.title">