yoyo-ng-modulewindy
Version:
服务于52ABP模板的前端开源的相关组件内容。整合了ng-alain和你NG ZORRO的内容
40 lines • 1.73 kB
JavaScript
import { Component, HostBinding, Input, Output, EventEmitter, } from '@angular/core';
import { toBoolean } from 'yoyo-ng-module/util';
var TagSelectComponent = /** @class */ (function () {
function TagSelectComponent() {
this._expandable = true;
this.expand = false;
this.change = new EventEmitter();
}
Object.defineProperty(TagSelectComponent.prototype, "expandable", {
/** 是否启用 `展开与收进` */
get: function () {
return this._expandable;
},
set: function (value) {
this._expandable = toBoolean(value);
},
enumerable: true,
configurable: true
});
TagSelectComponent.prototype.trigger = function () {
this.expand = !this.expand;
this.change.emit(this.expand);
};
TagSelectComponent.decorators = [
{ type: Component, args: [{
selector: 'tag-select',
template: "\n <ng-content></ng-content>\n <a *ngIf=\"expandable\" class=\"trigger\" (click)=\"trigger()\">{{expand ? '\u6536\u8D77' : '\u5C55\u5F00'}}<i class=\"anticon anticon-{{expand ? 'up' : 'down'}} ml-sm\"></i></a>",
host: { '[class.ad-tag-select]': 'true' },
preserveWhitespaces: false,
},] },
];
TagSelectComponent.propDecorators = {
expandable: [{ type: HostBinding, args: ['class.has-expand',] }, { type: Input }],
expand: [{ type: HostBinding, args: ['class.expanded',] }],
change: [{ type: Output }]
};
return TagSelectComponent;
}());
export { TagSelectComponent };
//# sourceMappingURL=tag-select.component.js.map