UNPKG

ng-lib-tsx

Version:

pc端基础类库

34 lines 951 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Button, Result } from 'antd'; import { NG } from 'ng-base-stand'; /** * 404 页面 * @param location * @constructor */ export function NotFound(_ref) { var _location$prevRoute; var location = _ref.location; var pathname = ((_location$prevRoute = location.prevRoute) === null || _location$prevRoute === void 0 ? void 0 : _location$prevRoute.pathname) || '#'; return _jsx(Result, { status: "404", title: "404", subTitle: _jsxs("span", { children: ["Sorry, the page", _jsx("span", { style: { fontWeight: 'bold', fontSize: 14, margin: '0 6px' }, children: pathname }), "you visited does not exist.`"] }), extra: _jsx(Button, { type: "primary", onClick: function onClick() { return NG.external.closeTab(false); }, children: "\u5173\u95ED" }) }); }