UNPKG

nsn-comp

Version:

NSN核心组件

39 lines (37 loc) 1.11 kB
import "antd/es/button/style"; import _Button from "antd/es/button"; import "antd/es/result/style"; import _Result from "antd/es/result"; import { NConst } from 'nsn-const'; import { NLocale } from 'nsn-util'; import React from 'react'; import { history } from 'umi'; var EPage = function EPage(_ref) { var status = _ref.status, title = _ref.title, subTitle = _ref.subTitle, buttonText = _ref.buttonText, backTo = _ref.backTo, icon = _ref.icon, iconWidth = _ref.iconWidth, hideExtra = _ref.hideExtra; return React.createElement(_Result, { status: status, icon: icon && React.createElement("img", { src: icon, alt: "icon", style: { width: iconWidth || 200 } }), title: title || NLocale.getText('exception.unknow'), subTitle: subTitle || NConst.EMPTY, extra: !hideExtra && React.createElement(_Button, { type: "primary", onClick: function onClick() { return history.push(backTo || NConst.URL_HOME); } }, buttonText || NLocale.getText('layout.home')) }); }; export default EPage;