yoyo-ng-modulewindy
Version:
服务于52ABP模板的前端开源的相关组件内容。整合了ng-alain和你NG ZORRO的内容
37 lines • 1.41 kB
JavaScript
import { Component, Input, HostBinding, Renderer2, ElementRef, } from '@angular/core';
import { toNumber } from 'yoyo-ng-module/util';
var EllipsisComponent = /** @class */ (function () {
function EllipsisComponent(el, render) {
this._lines = 3;
render.setStyle(el.nativeElement, '-webkit-box-orient', 'vertical');
}
Object.defineProperty(EllipsisComponent.prototype, "lines", {
/** 在按照行数截取下最大的行数,超过则截取省略 */
get: function () {
return this._lines;
},
set: function (value) {
this._lines = toNumber(value);
},
enumerable: true,
configurable: true
});
EllipsisComponent.decorators = [
{ type: Component, args: [{
selector: 'ellipsis',
template: "<ng-content></ng-content>",
host: { '[class.ad-ellipsis]': 'true' },
},] },
];
/** @nocollapse */
EllipsisComponent.ctorParameters = function () { return [
{ type: ElementRef },
{ type: Renderer2 }
]; };
EllipsisComponent.propDecorators = {
lines: [{ type: Input }, { type: HostBinding, args: ['style.-webkit-line-clamp',] }]
};
return EllipsisComponent;
}());
export { EllipsisComponent };
//# sourceMappingURL=ellipsis.component.js.map