@alauda-fe/common
Version:
Alauda frontend team common codes.
29 lines (28 loc) • 1.19 kB
TypeScript
import { AttrBoolean } from '@alauda/ui';
import { OnDestroy, OnInit } from '@angular/core';
import { ControlContainer, NgControl } from '@angular/forms';
import { Observable } from 'rxjs';
import * as i0 from "@angular/core";
/**
*
* Usage:
* If you want to disable a formControl.
*
* eg:
* <input formControlName="name" [aclDisabled]="true">
*
*/
export declare class DisabledDirective implements OnInit, OnDestroy {
private readonly ctrlContainer;
private readonly ngControl;
aclDisabled: AttrBoolean;
aclDisabled$: Observable<AttrBoolean>;
destroyStrategy?: 'check' | 'disable' | 'enable';
private readonly destroy$$;
constructor(ctrlContainer: ControlContainer, ngControl: NgControl);
ngOnInit(): void;
ngOnDestroy(): void;
private checkStatus;
static ɵfac: i0.ɵɵFactoryDeclaration<DisabledDirective, [{ optional: true; self: true; }, { optional: true; self: true; }]>;
static ɵdir: i0.ɵɵDirectiveDeclaration<DisabledDirective, "[aclDisabled]", never, { "aclDisabled": { "alias": "aclDisabled"; "required": false; }; "destroyStrategy": { "alias": "destroyStrategy"; "required": false; }; }, {}, never, never, true, never>;
}