mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
[improvement] declare functional sfc (#2695)
This commit is contained in:
@@ -2,25 +2,21 @@ import { use } from '../utils';
|
||||
|
||||
const [sfc, bem] = use('cell-group');
|
||||
|
||||
export default sfc(
|
||||
{
|
||||
props: {
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
export default sfc({
|
||||
functional: true,
|
||||
|
||||
render(h, context) {
|
||||
return (
|
||||
<div
|
||||
class={[bem(), { 'van-hairline--top-bottom': context.props.border }]}
|
||||
{...context.data}
|
||||
>
|
||||
{context.children}
|
||||
</div>
|
||||
);
|
||||
props: {
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
true
|
||||
);
|
||||
|
||||
render(h, context) {
|
||||
return (
|
||||
<div class={[bem(), { 'van-hairline--top-bottom': context.props.border }]} {...context.data}>
|
||||
{context.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user