import { Match, Show, Switch } from "solid-js"; import { Image } from "../Image"; import { typeImages } from "./typeImages"; import { useClassList } from "../utils/useProps" import { Text } from "../Typography/Text"; import { Button } from "../Button"; type ExceptionProps = { classList?: any, class?: string, type?: '404'|'403'|'500'|'empty'|'fail'|'deny', typeImage?: any, desc?: string, showDesc?: boolean, link?: string, showAction?: boolean, } export function Exception(props: ExceptionProps) { const classList = () => useClassList(props, 'cm-exception', { [`cm-exception-${props.type}`]: !!props.type }); const showDesc = props.showDesc ?? true; const showAction = props.showAction ?? true; return
}>
{/* 403 */} {props.desc ?? '抱歉,你无权访问该页面'} {/* 404 */} {props.desc ?? '抱歉,你访问的页面不存在'} {/* 500 */} {props.desc ?? '抱歉,服务器出错了'} {props.desc ?? '暂无数据'} {props.desc ?? '授权失败'} {props.desc ?? '拒绝访问'}
}