jpush-ui
Version:
极光大数据前端Angular组件(^6.1.0)
53 lines • 7.54 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 AlertData = /** @class */ (function (_super) {
__extends(AlertData, _super);
function AlertData() {
var _this = _super.call(this) || this;
// 新属性
_this.title = '提示';
_this.validFields.push('title', 'content');
return _this;
}
return AlertData;
}(dialog_model_1.DialogModelBase));
exports.AlertData = AlertData;
var AlertComponent = /** @class */ (function () {
function AlertComponent(data) {
this.data = data;
}
AlertComponent.prototype.ngOnInit = function () {
// pass
};
AlertComponent.prototype.onSure = function (event) {
this.data.isOpen = false;
this.data.sure.emit(event);
};
AlertComponent.decorators = [
{ type: core_1.Component, args: [{
selector: 'jui-dialog-alert',
template: "\n\n <jui-modal *ngIf=\"data\" [isOpen]=\"data?.isOpen\"\n [overlayClosable]=\"data?.overlayClosable\"\n [boxStyle]=\"data?.baseStyle\">\n <div class=\"alert-wrapper\">\n <div class=\"modal-header\">\n <strong>{{data.title}}</strong>\n </div>\n <div class=\"modal-body\">\n <p class=\"desc\">{{data.content}}</p>\n </div>\n <div class=\"modal-footer\">\n <div class=\"btns\">\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-alert ::ng-deep .main-container {\n max-width: 50%; }\n\n jui-dialog-alert .alert-wrapper {\n min-width: 300px; }\n jui-dialog-alert .alert-wrapper .modal-header {\n padding: 8px 10px;\n text-align: left;\n font-size: 14px;\n color: #777;\n border-bottom: 1px solid #eee; }\n jui-dialog-alert .alert-wrapper .modal-body {\n padding: 20px; }\n jui-dialog-alert .alert-wrapper .modal-body p.desc {\n font-size: 16px;\n color: #555;\n font-weight: 400;\n margin: 0; }\n jui-dialog-alert .alert-wrapper .modal-footer {\n padding: 10px;\n text-align: right; }\n "],
encapsulation: core_1.ViewEncapsulation.None,
},] },
];
/** @nocollapse */
AlertComponent.ctorParameters = function () { return [
{ type: AlertData, },
]; };
return AlertComponent;
}());
exports.AlertComponent = AlertComponent;
//# sourceMappingURL=alert.component.js.map