ng-ytl-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
43 lines (33 loc) • 919 B
text/typescript
import { Directive, ElementRef, HostBinding, Input } from '@angular/core';
import { toBoolean } from '../util/convert';
export class NzTabLabelDirective {
private _disabled = false;
set disabled(value: boolean) {
this._disabled = toBoolean(value);
}
get disabled(): boolean {
return this._disabled;
}
constructor(public elementRef: ElementRef) {
}
getOffsetLeft(): number {
return this.elementRef.nativeElement.offsetLeft;
}
getOffsetWidth(): number {
return this.elementRef.nativeElement.offsetWidth;
}
getOffsetTop(): number {
return this.elementRef.nativeElement.offsetTop;
}
getOffsetHeight(): number {
return this.elementRef.nativeElement.offsetHeight;
}
}