yylib-quick-mobile
Version:
yylib-quick-mobile
32 lines (29 loc) • 877 B
JavaScript
import React, {Component} from 'react';
import classnames from 'classnames';
import './YYLabel.less';
class YYLabel extends Component{
render() {
let {uititle,style,inline,visible,className,offline,parentType,uiorigin,RunInDesign,uitype,uikey,nid,findUI,...restProps}=this.props;
let wrapClz = classnames({
'yy-label': true,
'hidden': !visible,
className,
});
return inline?(
<span {...restProps} className={wrapClz} style={style}>{uititle}</span>
):(<div {...restProps} className={wrapClz} style={style}><span>{uititle}</span></div>);
}
}
YYLabel.defaultProps = {
visible: true,
//设计器需要的props,不添加会warning
offline:false,
parentType:'',
uiorigin:'',
RunInDesign:false,
uitype:'',
uikey:'',
nid:'',
findUI:''
}
module.exports = YYLabel;