替换containsAllLable
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
@ -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">
|
||||
|
||||
Reference in New Issue
Block a user