[improvement] declare functional sfc (#2695)

This commit is contained in:
neverland
2019-02-06 21:11:12 +08:00
committed by GitHub
parent 061382014d
commit 1b60e4df80
14 changed files with 465 additions and 494 deletions
+11 -12
View File
@@ -2,15 +2,14 @@ import { use } from '../utils';
const [sfc, bem] = use('goods-action');
export default sfc(
{
render(h, context) {
return (
<div class={bem()} {...context.data}>
{context.children}
</div>
);
}
},
true
);
export default sfc({
functional: true,
render(h, context) {
return (
<div class={bem()} {...context.data}>
{context.children}
</div>
);
}
});