mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[improvement] Badge: jsx (#2440)
This commit is contained in:
32
packages/badge-group/index.js
Normal file
32
packages/badge-group/index.js
Normal 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>
|
||||
);
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user