JSPM

  • Created
  • Published
  • Downloads 97
  • Score
    100M100P100Q94645F
  • License MIT

Empty component

Package Exports

  • @uiw/react-empty
  • @uiw/react-empty/cjs/index.js
  • @uiw/react-empty/esm/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@uiw/react-empty) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Empty 空状态

空状态时的展示占位图。

import { Empty } from 'uiw';
// or
import Empty from '@uiw/react-empty';

基本使用

import ReactDOM from 'react-dom';
import { Empty, Button } from 'uiw';

ReactDOM.render(
  <Empty />,
  _mount_  
);

自定义属性

通过自定义属性定制个性化展示。

import ReactDOM from 'react-dom';
import { Empty } from 'uiw';

ReactDOM.render(
  <Empty 
    text="没有数据了"
    type="file-excel"
    size={60}
    iconColor="red"
    textColor="red"
    description={<Button type="primary">新增数据</Button>}
  />,
  _mount_  
);

Props

参数 说明 类型 默认值
description 自定义描述内容 ReactNode -
iconColor 图标颜色 string -
size icon 大小 string / number -
type icon 图标 IconsName -
text 文字说明 string -
textColor 文字颜色 string -