yoyo-ng-modulewindy
Version:
服务于52ABP模板的前端开源的相关组件内容。整合了ng-alain和你NG ZORRO的内容
75 lines • 2.68 kB
JavaScript
import { Component, Input, ElementRef, Renderer2, } from '@angular/core';
import { toBoolean, updateHostClass } from 'yoyo-ng-module/util';
var StandardFormRowComponent = /** @class */ (function () {
function StandardFormRowComponent(el, renderer) {
this.el = el;
this.renderer = renderer;
}
Object.defineProperty(StandardFormRowComponent.prototype, "block", {
/** 是否整行 */
get: function () {
return this._block;
},
set: function (value) {
this._block = toBoolean(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(StandardFormRowComponent.prototype, "last", {
/** 是否最后一行 */
get: function () {
return this._last;
},
set: function (value) {
this._last = toBoolean(value);
},
enumerable: true,
configurable: true
});
Object.defineProperty(StandardFormRowComponent.prototype, "grid", {
/** 是否网格布局 */
get: function () {
return this._grid;
},
set: function (value) {
this._grid = toBoolean(value);
},
enumerable: true,
configurable: true
});
StandardFormRowComponent.prototype.setClass = function () {
var classMap = (_a = {},
_a['ad-standard-form-row'] = true,
_a['block'] = this.block,
_a['grid'] = this.grid,
_a['last'] = this.last,
_a);
updateHostClass(this.el.nativeElement, this.renderer, classMap);
var _a;
};
StandardFormRowComponent.prototype.ngOnChanges = function (changes) {
this.setClass();
};
StandardFormRowComponent.decorators = [
{ type: Component, args: [{
selector: 'standard-form-row',
template: "\n <div *ngIf=\"title\" class=\"label\"><span>{{title}}</span></div>\n <div class=\"control\"><ng-content></ng-content></div>\n ",
preserveWhitespaces: false,
},] },
];
/** @nocollapse */
StandardFormRowComponent.ctorParameters = function () { return [
{ type: ElementRef },
{ type: Renderer2 }
]; };
StandardFormRowComponent.propDecorators = {
title: [{ type: Input }],
block: [{ type: Input }],
last: [{ type: Input }],
grid: [{ type: Input }]
};
return StandardFormRowComponent;
}());
export { StandardFormRowComponent };
//# sourceMappingURL=standard-form-row.component.js.map