[improvement] Info: jsx (#2529)

This commit is contained in:
neverland
2019-01-15 21:12:00 +08:00
committed by GitHub
parent 2a2ab4c929
commit f41b9d3bd3
2 changed files with 13 additions and 19 deletions

13
packages/info/index.js Normal file
View File

@@ -0,0 +1,13 @@
import { use, isDef } from '../utils';
const [sfc, bem] = use('info');
export default sfc({
props: {
info: [String, Number]
},
render(h) {
return isDef(this.info) && <div class={bem()}>{this.info}</div>;
}
});