[improvement] Badge: jsx (#2440)

This commit is contained in:
neverland
2019-01-05 15:44:27 +08:00
committed by GitHub
parent 1468f9e210
commit de9c7ffe0a
3 changed files with 28 additions and 47 deletions

View File

@@ -0,0 +1,32 @@
import create from '../utils/create';
export default create({
name: 'badge-group',
props: {
activeKey: {
type: [Number, String],
default: 0
}
},
provide() {
return {
vanBadgeGroup: this
};
},
data() {
return {
badges: []
};
},
render(h) {
return (
<div class={['van-hairline--top-bottom', this.b()]}>
{this.$slots.default}
</div>
);
}
});