UNPKG

@wjya/ngx-webapp-icpc.group.pms

Version:

angular webapp : icpc.group.pms

44 lines 2.64 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var forms_1 = require("@angular/forms"); var OuterLinkComponent = /** @class */ (function () { function OuterLinkComponent(fb) { this.fb = fb; this.clickSave = new core_1.EventEmitter(); this.modalIsVisible = false; this.validateForm = this.fb.group({ url: [null], }); } OuterLinkComponent.prototype.ngOnInit = function () { }; OuterLinkComponent.prototype.handleCancel = function () { this.modalIsVisible = false; }; OuterLinkComponent.prototype.resetForm = function () { this.validateForm.reset(); for (var _i = 0, _a = Object.keys(this.validateForm.controls); _i < _a.length; _i++) { var key = _a[_i]; this.validateForm.controls[key].markAsPristine(); } }; OuterLinkComponent.prototype.onSave = function (val) { this.clickSave.emit(val); }; OuterLinkComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'zx-outer-link', template: "<nz-modal [nzVisible]=\"modalIsVisible\" [nzWidth]=\"600\" [nzTitle]=\"modalTitle\" [nzContent]=\"modalContent\" [nzFooter]=\"modalFooter\" (nzOnCancel)=\"handleCancel()\"><ng-template #modalTitle><span>\u81EA\u5B9A\u4E49\u5916\u94FE</span></ng-template><ng-template #modalContent><form nz-form [formGroup]=\"validateForm\"><div nz-form-item nz-row><div nz-form-label nz-col [nzSpan]=\"4\"><label nz-form-item-required>\u94FE\u63A5\u5730\u5740</label></div><div nz-col [nzSpan]=\"20\" nz-form-control nzHasFeedback><nz-input formControlName=\"url\" [nzPlaceHolder]=\"'\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740'\" [nzSize]=\"'large'\"></nz-input></div></div></form></ng-template><ng-template #modalFooter><button nz-button [nzType]=\"'default'\" [nzSize]=\"'large'\" (click)=\"handleCancel()\"><span>\u53D6 \u6D88</span></button> <button nz-button [nzType]=\"'primary'\" [nzSize]=\"'large'\" (click)=\"onSave(validateForm.value)\" [disabled]=\"!validateForm.valid\"><span>\u4FDD \u5B58</span></button></ng-template></nz-modal>" },] }, ]; /** @nocollapse */ OuterLinkComponent.ctorParameters = function () { return [ { type: forms_1.FormBuilder, }, ]; }; OuterLinkComponent.propDecorators = { "clickSave": [{ type: core_1.Output },], }; return OuterLinkComponent; }()); exports.OuterLinkComponent = OuterLinkComponent; //# sourceMappingURL=outer-link.component.js.map