functional: CellGroup, Icon, Info, Loading, GoodsAction (#2674)

This commit is contained in:
neverland
2019-02-02 11:33:22 +08:00
committed by GitHub
parent f0056297c6
commit 3c6c32e305
6 changed files with 141 additions and 109 deletions
+17 -8
View File
@@ -2,12 +2,21 @@ import { use, isDef } from '../utils';
const [sfc, bem] = use('info');
export default sfc({
props: {
info: [String, Number]
},
export default sfc(
{
props: {
info: [String, Number]
},
render(h) {
return isDef(this.info) && <div class={bem()}>{this.info}</div>;
}
});
render(h, { props, data }) {
return (
isDef(props.info) && (
<div class={bem()} {...data}>
{props.info}
</div>
)
);
}
},
true
);