mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
[new feature] add Tabbar component (#204)
* [Document] add english document of Checkbox * [Document] add english document of Field * [Document] add english document of NumberKeyboard * [bugfix] NumberKeyboard should not dispaly title when title is empty * [Document] add english document of PasswordInput * [Document] add english document of Radio * [document] add english document of Switch * [bugfix] remove redundent styles in english document * [Document] fix details * fix Switch test cases * [bugfix] Swipe shouid reinitialize when item changes * [new feature] ImagePreview reconstruct * [new feature] add Tabbar component
This commit is contained in:
@@ -8,14 +8,9 @@
|
||||
export default {
|
||||
name: 'van-swipe-item',
|
||||
|
||||
beforeCreate() {
|
||||
this.$parent.swipes.push(this);
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
offset: 0,
|
||||
index: this.$parent.swipes.indexOf(this)
|
||||
offset: 0
|
||||
};
|
||||
},
|
||||
|
||||
@@ -28,8 +23,12 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
beforeCreate() {
|
||||
this.$parent.swipes.push(this);
|
||||
},
|
||||
|
||||
destroyed() {
|
||||
this.$parent.swipes.splice(this.index, 1);
|
||||
this.$parent.swipes.splice(this.$parent.swipes.indexOf(this), 1);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user