This commit is contained in:
syuilo
2018-08-05 13:40:26 +09:00
parent b68f74f39c
commit 128a201b9d
6 changed files with 84 additions and 23 deletions

View File

@ -1,6 +1,6 @@
<template>
<component :is="ui ? 'mk-ui' : 'div'">
<mk-reversi :game-id="$route.params.game" @nav="nav"/>
<mk-reversi :game-id="$route.params.game" @nav="nav" :self-nav="false"/>
</component>
</template>
@ -14,9 +14,14 @@ export default Vue.extend({
}
},
methods: {
nav(game) {
history.pushState(null, null, '/reversi/' + game.id);
},
nav(game, actualNav) {
if (actualNav) {
this.$router.push('/reversi/' + game.id);
} else {
// TODO: https://github.com/vuejs/vue-router/issues/703
this.$router.push('/reversi/' + game.id);
}
}
}
});
</script>