import { Component, OnInit, Input, ElementRef, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'mat-panel-header',
encapsulation: ViewEncapsulation.None,
templateUrl: './mat-panel-header.component.html',
styleUrls: ['./mat-panel-header.component.less']
})
export class MatPanelHeaderComponent {
_isShow = true;
_el: HTMLElement;
@Input() tableName: string;
constructor(private _elementRef: ElementRef) {
this._el = this._elementRef.nativeElement;
}
toggleShow() {
this._isShow = !this._isShow;
this._el.nextElementSibling['style'].display = this._isShow === true ? '' : 'none';
}
}
|