UNPKG

yoyo-ng-modulewindy

Version:

服务于52ABP模板的前端开源的相关组件内容。整合了ng-alain和你NG ZORRO的内容

83 lines 3.2 kB
import { Component, Input, TemplateRef } from '@angular/core'; var ResultComponent = /** @class */ (function () { function ResultComponent() { // region: fields this._type = ''; this._icon = ''; this._title = ''; this._description = ''; this._extra = ''; // endregion } Object.defineProperty(ResultComponent.prototype, "type", { set: function (value) { this._type = value; switch (value) { case 'success': this._icon = 'check-circle'; break; case 'error': this._icon = 'close-circle'; break; default: this._icon = value; break; } }, enumerable: true, configurable: true }); Object.defineProperty(ResultComponent.prototype, "title", { set: function (value) { if (value instanceof TemplateRef) { this._title = null; this._titleTpl = value; } else this._title = value; }, enumerable: true, configurable: true }); Object.defineProperty(ResultComponent.prototype, "description", { set: function (value) { if (value instanceof TemplateRef) { this._description = null; this._descriptionTpl = value; } else this._description = value; }, enumerable: true, configurable: true }); Object.defineProperty(ResultComponent.prototype, "extra", { set: function (value) { if (value instanceof TemplateRef) { this._extra = null; this._extraTpl = value; } else this._extra = value; }, enumerable: true, configurable: true }); ResultComponent.decorators = [ { type: Component, args: [{ selector: 'result', template: "\n <div class=\"icon\"><i class=\"anticon anticon-{{_icon}} {{_type}}\"></i></div>\n <div class=\"title\"><ng-container *ngIf=\"_title; else _titleTpl\">{{_title}}</ng-container></div>\n <div *ngIf=\"_description || _descriptionTpl\" class=\"description\"><ng-container *ngIf=\"_description; else _descriptionTpl\">{{_description}}</ng-container></div>\n <div *ngIf=\"_extra || _extraTpl\" class=\"extra\">\n <ng-container *ngIf=\"_extra; else _extraTpl\">{{_extra}}</ng-container>\n </div>\n <div class=\"actions\"><ng-content></ng-content></div>\n ", host: { '[class.ad-result]': 'true' }, preserveWhitespaces: false, },] }, ]; ResultComponent.propDecorators = { type: [{ type: Input }], title: [{ type: Input }], description: [{ type: Input }], extra: [{ type: Input }] }; return ResultComponent; }()); export { ResultComponent }; //# sourceMappingURL=result.component.js.map