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