jpush-ui
Version:
极光大数据前端Angular组件(^6.1.0)
60 lines • 7.42 kB
JavaScript
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var dialog_model_1 = require("../dialog.model");
var ConfirmData = /** @class */ (function (_super) {
__extends(ConfirmData, _super);
function ConfirmData() {
var _this = _super.call(this) || this;
// 新特性
_this.closeOnSure = true;
_this.closeTxt = '取消';
_this.validFields.push('content', 'closeOnSure', 'closeTxt');
return _this;
}
return ConfirmData;
}(dialog_model_1.DialogModelBase));
exports.ConfirmData = ConfirmData;
var ConfirmComponent = /** @class */ (function () {
function ConfirmComponent(data) {
this.data = data;
}
ConfirmComponent.prototype.ngOnInit = function () {
// pass
};
ConfirmComponent.prototype.onSure = function (event) {
if (this.data.closeOnSure) {
this.data.isOpen = false;
}
this.data.sure.emit(event);
};
ConfirmComponent.prototype.onClose = function (event) {
this.data.isOpen = false;
this.data.close.emit(event);
};
ConfirmComponent.decorators = [
{ type: core_1.Component, args: [{
selector: 'jui-dialog-confirm',
template: "\n <jui-modal *ngIf=\"data\" [isOpen]=\"data?.isOpen\" [overlayClosable]=\"data?.overlayClosable\" [boxStyle]=\"data?.baseStyle\">\n <div class=\"confirm-wrapper\">\n <div class=\"modal-body\">\n <h3>{{data.content}}</h3>\n </div>\n <div class=\"modal-footer\">\n <div class=\"btns\">\n <button jui-btn (click)=\"onClose($event)\">\n {{data.closeTxt}}\n </button>\n <button jui-btn (click)=\"onSure($event)\">\n {{data.sureTxt}}\n </button>\n </div>\n </div>\n </div>\n </jui-modal>\n ",
styles: ["\n @font-face {\n font-family: 'iconfont';\n /* project id 290315 */\n src: url(\"//at.alicdn.com/t/font_290315_x4r2fph1yvutbj4i.eot\");\n src: url(\"//at.alicdn.com/t/font_290315_x4r2fph1yvutbj4i.eot?#iefix\") format(\"embedded-opentype\"), url(\"//at.alicdn.com/t/font_290315_x4r2fph1yvutbj4i.woff\") format(\"woff\"), url(\"//at.alicdn.com/t/font_290315_x4r2fph1yvutbj4i.ttf\") format(\"truetype\"), url(\"//at.alicdn.com/t/font_290315_x4r2fph1yvutbj4i.svg#iconfont\") format(\"svg\"); }\n\n .iconfont {\n display: inline-block;\n vertical-align: baseline;\n font-family: \"iconfont\" !important;\n font-style: normal;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale; }\n\n .icon-jui-alert:before {\n content: \"\\e600\"; }\n\n .icon-jui-search:before {\n content: \"\\e630\"; }\n\n .icon-jui-paper3:before {\n content: \"\\e652\"; }\n\n .icon-jui-setting:before {\n content: \"\\e602\"; }\n\n .icon-jui-left2:before {\n content: \"\\e697\"; }\n\n .icon-jui-wrong:before {\n content: \"\\e69a\"; }\n\n .icon-jui-up2:before {\n content: \"\\e6a5\"; }\n\n .icon-jui-down2:before {\n content: \"\\e6a6\"; }\n\n .icon-jui-right2:before {\n content: \"\\e6a7\"; }\n\n .icon-jui-correct2:before {\n content: \"\\e627\"; }\n\n .icon-jui-qq:before {\n content: \"\\e63a\"; }\n\n .icon-jui-email:before {\n content: \"\\e62a\"; }\n\n .icon-jui-edit:before {\n content: \"\\e686\"; }\n\n .icon-jui-download2:before {\n content: \"\\e714\"; }\n\n .icon-jui-speaker:before {\n content: \"\\e85c\"; }\n\n .icon-jui-add:before {\n content: \"\\e609\"; }\n\n .icon-jui-msg:before {\n content: \"\\e613\"; }\n\n .icon-jui-minus:before {\n content: \"\\e601\"; }\n\n .icon-jui-up:before {\n content: \"\\e658\"; }\n\n .icon-jui-letter-open:before {\n content: \"\\e61d\"; }\n\n .icon-jui-down:before {\n content: \"\\ed22\"; }\n\n .icon-jui-info:before {\n content: \"\\e685\"; }\n\n .icon-jui-cross2:before {\n content: \"\\e6b4\"; }\n\n .icon-jui-paper2:before {\n content: \"\\e71e\"; }\n\n .icon-jui-loading:before {\n content: \"\\eee3\"; }\n\n .icon-jui-road-sign:before {\n content: \"\\e604\"; }\n\n .icon-jui-left:before {\n content: \"\\e66a\"; }\n\n .icon-jui-letter:before {\n content: \"\\e605\"; }\n\n .icon-jui-right:before {\n content: \"\\e64d\"; }\n\n .icon-jui-back-top:before {\n content: \"\\e628\"; }\n\n .icon-jui-dropdown:before {\n content: \"\\e75a\"; }\n\n .icon-jui-down3:before {\n content: \"\\e629\"; }\n\n .icon-jui-alarm:before {\n content: \"\\e6c2\"; }\n\n .icon-jui-paper:before {\n content: \"\\e612\"; }\n\n .icon-jui-cross:before {\n content: \"\\e6b0\"; }\n\n .icon-jui-correct:before {\n content: \"\\e6b3\"; }\n\n .icon-jui-up3:before {\n content: \"\\eee4\"; }\n\n .icon-jui-username:before {\n content: \"\\e670\"; }\n\n .icon-jui-password:before {\n content: \"\\e615\"; }\n\n .icon-jui-slideLeft:before {\n content: \"\\e603\"; }\n\n .icon-jui-slideRight:before {\n content: \"\\e641\"; }\n\n /* icon Animate */\n .icon-doTurn {\n -webkit-animation: doTurn 1s infinite linear;\n animation: doTurn 1s infinite linear; }\n\n @-webkit-keyframes doTurn {\n 0% {\n -webkit-transform-origin: 50% 50%;\n -webkit-transform: rotate(0deg); }\n to {\n -webkit-transform-origin: 50% 50%;\n -webkit-transform: rotate(1turn); } }\n\n @keyframes doTurn {\n 0% {\n transform-origin: 50% 50%;\n transform: rotate(0deg); }\n to {\n transform-origin: 50% 50%;\n transform: rotate(1turn); } }\n jui-dialog-confirm ::ng-deep .main-container {\n max-width: 50%; }\n\n jui-dialog-confirm .confirm-wrapper {\n min-width: 400px; }\n jui-dialog-confirm .confirm-wrapper .modal-body {\n padding: 30px 20px 10px; }\n jui-dialog-confirm .confirm-wrapper .modal-body h3 {\n font-size: 1.1em;\n font-weight: bold;\n margin: 0; }\n jui-dialog-confirm .confirm-wrapper .modal-footer {\n padding: 10px;\n text-align: right; }\n jui-dialog-confirm .confirm-wrapper .modal-footer .btns ng-button {\n margin: 0 6px; }\n "],
encapsulation: core_1.ViewEncapsulation.None,
},] },
];
/** @nocollapse */
ConfirmComponent.ctorParameters = function () { return [
{ type: ConfirmData, },
]; };
return ConfirmComponent;
}());
exports.ConfirmComponent = ConfirmComponent;
//# sourceMappingURL=confirm.component.js.map