@beisen-platform/empty-component

用于组件无数据时的提示,可根据组件的不同宽高,显示不同大小的展示图片描述文字可自定义

Usage no npm install needed!

<script type="module">
  import beisenPlatformEmptyComponent from 'https://cdn.skypack.dev/@beisen-platform/empty-component';
</script>

README

empty-component(无数据显示)使用说明

项目运行

  1. cnpm install 或 npm install cnpm使用教程

  2. npm run dev (开发环境打包 port:8080)

  3. npm run test (测试用例)

  4. npm run build (生产环境打包)

empty-component参数

  {
      ContainerHeight: 444, //外界容器高度,默认宽度为150px
      ContainerWidth: 222    //外界容器宽度
  }

empty-component使用方法

1.安装npm组件包

npm install @beisen/empty-component --save-dev

2.引用组件

import EmptyComponent from './src/index.js';

3.传入参数

该参数为上述参数,传入方式使用props传入,如果不传入默认高度为150px。
class Demo extends Component {
constructor() {
  super();
  this.state = {
    ContainerHeight: 444,  //外界容器高度,默认宽度150px
    ContainerWidth: 222    //外界容器宽度
  }
}
render() {
  return (
    <div>
        <EmptyComponent {...this.state}/>
    </div>
  )
}
}
render(<Demo />, document.getElementById('content'))

Beisen-module-template

没有数据时使用该组件展示

使用

import Empty from '@beisen-cmps/empty'

<Empty />

API

属性 描述 类型 默认值
ContainerHeight 容器高度 number 150
ContainerWidth 容器宽度 number -