UNPKG

@uiw-admin/exceptions

Version:
43 lines (42 loc) 1.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _uiw = require("uiw"); var _reactRouter = require("react-router"); var _jsxRuntime = require("react/jsx-runtime"); var Exception404 = function Exception404(_ref) { var _ref$path = _ref.path, path = _ref$path === void 0 ? '/home' : _ref$path, _ref$btnText = _ref.btnText, btnText = _ref$btnText === void 0 ? '返回首页' : _ref$btnText; var navigate = (0, _reactRouter.useNavigate)(); return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { className: "exceptions", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "contentimgs", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "imgscontent imgs404" }) }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { className: "contents", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h1", { children: "404" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", { children: "\u62B1\u6B49\uFF0C\u4F60\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728" }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_uiw.Button, { onClick: function onClick() { return navigate(path, { replace: true }); }, type: "primary", children: btnText })] })] }); }; var _default = Exception404; exports["default"] = _default; module.exports = exports.default;