Commit 568aaefd authored by 涂茜's avatar 涂茜

fix: 修改props

parent b1248288
Pipeline #24070 failed with stages
in 1 minute 30 seconds
......@@ -95,15 +95,15 @@ export default {
'/components': [
{
title: '布局',
children: ['card'],
children: ['Empty'],
},
{
title: '通用',
children: ['card'],
children: ['Empty'],
},
{
title: '数据录入',
children: ['card'],
children: ['Empty'],
},
{
title: '数据展示',
......
......@@ -27,6 +27,6 @@ group:
| description | 自定义描述内容 | ReactNode | - |
| image | 设置显示图片,为 string 时表示自定义图片地址 | ReactNode | - |
| theme | 设置主题 | string | 可选值:light/dark, 默认 light |
| size | 设置图片尺寸 | string | 可选值:small/normal/large, 默认 normal |
| size | 设置图片尺寸 | string | 可选值:small/middle/large, 默认 middle |
| statusCode | 状态码 | string | 可选值:0/-1/-2, 默认 0 |
| imageStyle | 图片样式 | CSSProperties | - |
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import noDataLight from './noDataLight.svg';
import noDataDark from './noDataDark.svg';
import errorLight from './errorLight.png';
import errorDark from './errorDark.png';
import noDataLight from './assets/noDataLight.svg';
import noDataDark from './assets/noDataDark.svg';
import errorLight from './assets/errorLight.png';
import errorDark from './assets/errorDark.png';
import './index.less';
......@@ -35,7 +35,7 @@ Empty.defaultProps = {
description: '',
image: '',
theme: 'light',
size: 'normal',
size: 'middle',
statusCode: '0',
imageStyle: {},
};
......@@ -44,7 +44,7 @@ Empty.propTypes = {
description: PropTypes.node, // 自定义描述内容
image: PropTypes.node, // 设置显示图片,为 string 时表示自定义图片地址
theme: PropTypes.string, // 设置主题 light dark
size: PropTypes.string, // 设置图片尺寸 small normal large
size: PropTypes.string, // 设置图片尺寸 small middle large
statusCode: PropTypes.string, // 状态码
imageStyle: PropTypes.object, // 图片样式
};
......
......@@ -27,7 +27,7 @@
}
}
&.normal {
&.middle {
margin: 32px 0;
.image {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment