error-component-test 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "error-component-test",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "异常组件",
5
5
  "homepage": "",
6
6
  "license": "ISC",
package/readme.md ADDED
@@ -0,0 +1,2 @@
1
+ # 测试npm包
2
+
package/src/index.tsx CHANGED
@@ -1,6 +1,7 @@
1
1
  import './index.less';
2
2
  import React from 'react';
3
3
  import classnames from 'classnames';
4
+ import { Button } from 'antd';
4
5
 
5
6
  interface IProps {
6
7
  text?: string; // 提示的文案
@@ -16,6 +17,7 @@ const Error = (props: IProps) => {
16
17
  <div className="error-component-content">
17
18
  <span className={classnames('error-component-img', props.type === '404' && 'error-component-img-404')}></span>
18
19
  <p className="error-component-text">{props.text || '服务器正在开小差,请稍后再试'}</p>
20
+ <Button>返回首页</Button>
19
21
  <a href="/">返回首页</a>
20
22
  </div>
21
23
  </div>