[improvement] CellGroup: jsx (#2449)

This commit is contained in:
neverland 2019-01-06 22:20:30 +08:00 committed by GitHub
parent 149d2aa832
commit e437e9c10d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 20 deletions

View File

@ -0,0 +1,20 @@
import createSfc from '../utils/create-basic';
export default createSfc({
name: 'cell-group',
props: {
border: {
type: Boolean,
default: true
}
},
render(h) {
return (
<div class={['van-cell-group', { 'van-hairline--top-bottom': this.border }]}>
{this.$slots.default}
</div>
);
}
});

View File

@ -1,20 +0,0 @@
<template>
<div :class="[b(), { 'van-hairline--top-bottom': border }]">
<slot />
</div>
</template>
<script>
import create from '../utils/create-basic';
export default create({
name: 'cell-group',
props: {
border: {
type: Boolean,
default: true
}
}
});
</script>