0.0.4 • Published 5 years ago
com-empty-page v0.0.4
com-empty-page
a react empty page component
install
npm install --save com-empty-page
usage
import EmptyPage from 'com-empty-page';
<EmptyPage
isPureImage={false}
imgSrc='https://img.alicdn.com/tfs/TB15imCOrvpK1RjSZPiXXbmwXXa-640-640.png'
title='我是标题'
subTitle='指引文案xxxxxx'
btnText='按钮文案'
btnCallbackFunc={btnCallbackFunc}
onCancelText='次要按钮',
onCancelCallbackFunc={onCancelCallbackFunc},
/>
development
npm install
npm start
publish
npm publish
参数
Option | Type | Description |
---|---|---|
title | string | 标题 |
subTitle | string | 副标题 |
btnText | string | 按钮文案 |
btnCallbackFunc | function | 回调函数,点击按钮时触发 |
imgSrc | string | 图片URL |
isPureImage | boolean | 是否只显示图片(为true时 subtitle、btnInfo、callBackFn传值无效) |
onCancelText | string | 次要按钮 |
onCancelCallbackFunc | function | 次要按钮的回调函数 |