UNPKG

yoyo-ng-modulewindy

Version:

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

56 lines 2.35 kB
import { Component, Input } from '@angular/core'; import { toNumber } from 'yoyo-ng-module/util'; var G2ProgressComponent = /** @class */ (function () { function G2ProgressComponent() { // region: fields this.color = '#1890FF'; // endregion } Object.defineProperty(G2ProgressComponent.prototype, "target", { get: function () { return this._target; }, set: function (value) { this._target = Math.min(Math.max(toNumber(value), 0), 100); }, enumerable: true, configurable: true }); Object.defineProperty(G2ProgressComponent.prototype, "strokeWidth", { get: function () { return this._strokeWidth; }, set: function (value) { this._strokeWidth = toNumber(value); }, enumerable: true, configurable: true }); Object.defineProperty(G2ProgressComponent.prototype, "percent", { get: function () { return this._percent; }, set: function (value) { this._percent = Math.min(Math.max(toNumber(value), 0), 100); }, enumerable: true, configurable: true }); G2ProgressComponent.decorators = [ { type: Component, args: [{ selector: 'g2-mini-progress', template: "\n <nz-tooltip [nzTitle]=\"'\u76EE\u6807\u503C: ' + target + '%'\">\n <div nz-tooltip class=\"target\" [ngStyle]=\"{'left.%': target}\">\n <span [ngStyle]=\"{'background-color': color}\"></span>\n <span [ngStyle]=\"{'background-color': color}\"></span>\n </div>\n </nz-tooltip>\n <div class=\"progress-wrap\">\n <div class=\"progress\" [ngStyle]=\"{'background-color': color, 'width.%': percent, 'height.px':strokeWidth}\"></div>\n </div>\n ", host: { '[class.ad-g2-progress]': 'true' }, preserveWhitespaces: false, },] }, ]; G2ProgressComponent.propDecorators = { color: [{ type: Input }], target: [{ type: Input }], strokeWidth: [{ type: Input }], percent: [{ type: Input }] }; return G2ProgressComponent; }()); export { G2ProgressComponent }; //# sourceMappingURL=mini-progress.component.js.map