💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## DefaultValueAccessor The default accessor for writing a value and listening to changes that is used by the **ngModel**, **FormControlDirective**, **FormControlName**, and **directives** ### 接口 ```typescript class DefaultValueAccessor { constructor(_renderer: Renderer, _elementRef: ElementRef) onChange : (_: any) => {} onTouched : () => {} writeValue(value: any) : void registerOnChange(fn: (_: any) => void) : void registerOnTouched(fn: () => void) : void setDisabledState(isDisabled: boolean) : void } ``` ### 选择器 ```typescript input:not([type=checkbox])[formControlName] textarea[formControlName] input:not([type=checkbox])[formControl] textarea[formControl] input:not([type=checkbox])[ngModel] textarea[ngModel] [ngDefaultControl] ``` ### 属性 - onChange : (_: `any`) => {} - onTouched : () => {} - writeValue(value: `any`) : `void` - registerOnChange(fn: (_: `any`) => `void`) : `void` - registerOnTouched(fn: () => `void`) : `void` - setDisabledState(isDisabled: `boolean`) : `void`