yoyo-ng-modulewindy
Version:
服务于52ABP模板的前端开源的相关组件内容。整合了ng-alain和你NG ZORRO的内容
58 lines • 2.23 kB
JavaScript
import { Component, Input, ChangeDetectionStrategy, ChangeDetectorRef, HostBinding, Output, EventEmitter, } from '@angular/core';
import { QRService } from './qr.service';
import { AdQRConfig } from './qr.config';
var QRComponent = /** @class */ (function () {
// endregion
function QRComponent(cog, srv, cd) {
this.srv = srv;
this.cd = cd;
/** 变更时回调 */
this.change = new EventEmitter();
Object.assign(this, cog);
}
QRComponent.prototype.ngOnChanges = function (changes) {
this.dataURL = this.srv.refresh({
background: this.background,
backgroundAlpha: this.backgroundAlpha,
foreground: this.foreground,
foregroundAlpha: this.foregroundAlpha,
level: this.level,
mime: this.mime,
padding: this.padding,
size: this.size,
value: this.value
});
this.cd.detectChanges();
this.change.emit(this.dataURL);
};
QRComponent.decorators = [
{ type: Component, args: [{
selector: 'qr',
template: "\n <img src=\"{{dataURL}}\">\n ",
preserveWhitespaces: false,
host: { '[class.ad-qr]': 'true' },
changeDetection: ChangeDetectionStrategy.OnPush,
},] },
];
/** @nocollapse */
QRComponent.ctorParameters = function () { return [
{ type: AdQRConfig },
{ type: QRService },
{ type: ChangeDetectorRef }
]; };
QRComponent.propDecorators = {
background: [{ type: Input }],
backgroundAlpha: [{ type: Input }],
foreground: [{ type: Input }],
foregroundAlpha: [{ type: Input }],
level: [{ type: Input }],
mime: [{ type: Input }],
padding: [{ type: Input }],
size: [{ type: HostBinding, args: ['style.height.px',] }, { type: HostBinding, args: ['style.width.px',] }, { type: Input }],
value: [{ type: Input }],
change: [{ type: Output }]
};
return QRComponent;
}());
export { QRComponent };
//# sourceMappingURL=qr.component.js.map