UNPKG

@grc/business

Version:

更新sider选项 : forceSubMenuRender

42 lines (41 loc) 2.19 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { 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 extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import React, { PureComponent } from "react"; import { Button } from "@grc/base/components/button"; import { Modal } from "@grc/base/components/modal"; var ImportFileModalComponent = /** @class */ (function (_super) { __extends(ImportFileModalComponent, _super); function ImportFileModalComponent(props, context) { var _this = _super.call(this, props, context) || this; _this._modalRef = React.createRef(); return _this; } ImportFileModalComponent.prototype.getModalRef = function () { if (this._modalRef) return this._modalRef.current; return null; }; ImportFileModalComponent.prototype.render = function () { var _a = this.props, cancelText = _a.cancelText, continueText = _a.continueText, onCancel = _a.onCancel, onContinue = _a.onContinue, children = _a.children, visible = _a.visible, prefixCls = _a.prefixCls; return (React.createElement(Modal, { className: prefixCls + "-modal", closable: false, visible: visible, ref: this._modalRef, footer: (React.createElement("div", { className: "button-group" }, cancelText && (React.createElement(Button, { type: "default", onClick: function () { onCancel && onCancel(); } }, cancelText)), continueText && (React.createElement(Button, { type: "primary", onClick: function () { onContinue && onContinue(); } }, continueText)))) }, children)); }; return ImportFileModalComponent; }(PureComponent)); export default ImportFileModalComponent;