UNPKG

yylib-quick-mobile

Version:

yylib-quick-mobile

50 lines (46 loc) 1.68 kB
/** * Created by whh on 2017/12/26. */ import React, {Component} from 'react'; import {Icon} from 'antd-mobile'; import YYNavBar from '../YYNavBar' class YYNavBarDemo extends Component { state = {}; componentDidMount() { } render() { return ( <div> <YYNavBar mode="dark" leftIcon={<Icon type="left"/>} leftContent='返回' onLeftClick={() => console.log('onLeftClick')} rightContent={[ <Icon key="0" type="search" style={{marginRight: '16px'}}/>, <Icon key="1" type="ellipsis"/>, ]} >内置返回按钮md(组件)</YYNavBar> <YYNavBar mode="light" leftIcon="arrowBack" leftContent='返回' rightContent={[ <Icon key="0" type="search" style={{marginRight: '16px'}}/>, <Icon key="1" type="ellipsis"/>, ]} >icop返回按钮xs</YYNavBar> <YYNavBar mode="light" leftIcon="left" leftContent='返回' rightContent={[ <Icon key="0" type="search" style={{marginRight: '16px'}}/>, <Icon key="1" type="ellipsis"/>, ]} >内置返回按钮xs(字符串)</YYNavBar> </div> ); } } export default YYNavBarDemo;