yoyo-ng-modulewindy
Version:
服务于52ABP模板的前端开源的相关组件内容。整合了ng-alain和你NG ZORRO的内容
50 lines • 2.21 kB
JavaScript
import { Component, Input, Inject, TemplateRef, ContentChild, ElementRef, Renderer2, } from '@angular/core';
import { DOCUMENT } from '@angular/common';
import { toBoolean } from 'yoyo-ng-module/util';
var CLS = 'ad-footer-toolbar';
var FooterToolbarComponent = /** @class */ (function () {
function FooterToolbarComponent(el, renderer, doc) {
this.el = el;
this.renderer = renderer;
this.doc = doc;
this._errorCollect = false;
}
Object.defineProperty(FooterToolbarComponent.prototype, "errorCollect", {
get: function () {
return this._errorCollect;
},
set: function (value) {
this._errorCollect = toBoolean(value);
},
enumerable: true,
configurable: true
});
FooterToolbarComponent.prototype.ngOnInit = function () {
this.el.nativeElement.classList.add(CLS);
this.renderer.addClass(this.el.nativeElement, CLS);
this.doc.querySelector('body').classList.add("has-" + CLS);
};
FooterToolbarComponent.prototype.ngOnDestroy = function () {
this.doc.querySelector('body').classList.remove("has-" + CLS);
};
FooterToolbarComponent.decorators = [
{ type: Component, args: [{
selector: 'footer-toolbar',
template: "\n <div class=\"left\"><ng-container *ngIf=\"extra\" [ngTemplateOutlet]=\"extra\"></ng-container></div>\n <div class=\"right\">\n <error-collect *ngIf=\"errorCollect\"></error-collect>\n <ng-content></ng-content>\n </div>\n ",
preserveWhitespaces: false,
},] },
];
/** @nocollapse */
FooterToolbarComponent.ctorParameters = function () { return [
{ type: ElementRef },
{ type: Renderer2 },
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
]; };
FooterToolbarComponent.propDecorators = {
errorCollect: [{ type: Input }],
extra: [{ type: ContentChild, args: ['extra',] }]
};
return FooterToolbarComponent;
}());
export { FooterToolbarComponent };
//# sourceMappingURL=footer-toolbar.component.js.map