WingBlank 两翼留白

布局控件

代码演示

基本

<WingBlank size='md'>…</WingBlank>

  1. import { WingBlank, WhiteSpace } from 'antd-mobile';
  2. const PlaceHolder = props => (
  3. <div
  4. style={{
  5. backgroundColor: '#ebebef',
  6. color: '#bbb',
  7. textAlign: 'center',
  8. height: '0.6rem',
  9. lineHeight: '0.6rem',
  10. width: '100%',
  11. }}
  12. {...props}
  13. >Block</div>
  14. );
  15. const WingBlankExample = () => (
  16. <div style={{ padding: '0.3rem 0' }}>
  17. <WingBlank><PlaceHolder /></WingBlank>
  18. <WhiteSpace size="lg" />
  19. <WingBlank size="md"><PlaceHolder /></WingBlank>
  20. <WhiteSpace size="lg" />
  21. <WingBlank size="sm"><PlaceHolder /></WingBlank>
  22. </div>
  23. );
  24. ReactDOM.render(<WingBlankExample />, mountNode);

WingBlank两翼留白 - 图1

API

适用平台:WEB、React-Native
属性说明类型默认值
size两翼留白的间距,可选sm,md,lgstringlg