mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 10:07:07 +00:00
[breaking change] Badge: rename to sidebar
This commit is contained in:
28
packages/sidebar/index.js
Normal file
28
packages/sidebar/index.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import { use } from '../utils';
|
||||
|
||||
const [sfc, bem] = use('sidebar');
|
||||
|
||||
export default sfc({
|
||||
props: {
|
||||
activeKey: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
|
||||
provide() {
|
||||
return {
|
||||
vanSidebar: this
|
||||
};
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
items: []
|
||||
};
|
||||
},
|
||||
|
||||
render(h) {
|
||||
return <div class={[bem(), 'van-hairline--top-bottom']}>{this.slots()}</div>;
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user