Made tab swiping sync with the tab list
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
class="fill-height"
|
||||
>
|
||||
<v-tabs-items
|
||||
v-model="tabs"
|
||||
v-model="activeTab"
|
||||
>
|
||||
<v-tab-item>
|
||||
<stats-tab :creature-id="creatureId" />
|
||||
@@ -103,6 +103,16 @@
|
||||
'creature.name'(value){
|
||||
this.$store.commit('setPageTitle', value || 'Character Sheet');
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
activeTab: {
|
||||
get(){
|
||||
return this.tabs;
|
||||
},
|
||||
set(newTab){
|
||||
this.$emit('update:tabs', newTab);
|
||||
},
|
||||
},
|
||||
},
|
||||
meteor: {
|
||||
$subscribe: {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<v-fade-transition
|
||||
mode="out-in"
|
||||
>
|
||||
<router-view :tabs="tabs" />
|
||||
<router-view :tabs.sync="tabs" />
|
||||
</v-fade-transition>
|
||||
</v-content>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<character-sheet
|
||||
show-menu-button
|
||||
:creature-id="$route.params.id"
|
||||
:tabs="tabs"
|
||||
:tabs.sync="activeTab"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -18,5 +18,15 @@ export default {
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
activeTab: {
|
||||
get(){
|
||||
return this.tabs;
|
||||
},
|
||||
set(newTab){
|
||||
this.$emit('update:tabs', newTab);
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user