
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@txdfe/at-error-page
Advanced tools
AT 异常页面,有404、500、无访问权限以及默认的四种
提供使用 status 和 其他属性:
属性 | 类型 | 可选值 | 默认值 | 说明 |
---|---|---|---|---|
status | String | 404 500 403 | null | 异常状态码,必传属性,如果不是这三种三种按默认类型处理 |
size | String | large middle small | large | 页面类型 |
image | String | null | 三种状态码默认背景图 | 宽度固定高度自适应的图片 |
title | String、ReactNode | null | size为large有根据status相对应的title | Title |
desc | String、ReactNode | null | size为large根据status相对应的desc | Desc |
btnProps | Array | null | null | 定义的按钮属性方法 |
link | String | null | null | 错误提醒的链接 |
代码示例:
import ErrorPage from '@txdfe/at-error-page';
const Demo = () => {
const props = [
{
type: 'normal',
name: '返回上一页',
onClick: () => {
console.log('点击首个按钮');
},
},
{
type: 'primary',
name: '返回首页',
onClick: () => {
console.log('点击第二个按钮');
},
},
];
return (
<div>
<h4>large</h4>
<ErrorPage status="404" title="title" desc="dec" btnProps={props} />
<h4>middle</h4>
<ErrorPage status="500" size="middle" title="这里是title" desc="这里是desc" />
<h4>small</h4>
<ErrorPage size="small" title="这里是title" desc="这里是desc" noBtn />
</div>
);
};
FAQs
AT业务组件 - 异常页面
The npm package @txdfe/at-error-page receives a total of 2 weekly downloads. As such, @txdfe/at-error-page popularity was classified as not popular.
We found that @txdfe/at-error-page demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.