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,7 +1,7 @@
<template>
<mk-ui>
<span slot="header">%fa:gamepad%%i18n:@reversi%</span>
<mk-reversi :game-id="$route.params.game" @nav="nav"/>
<mk-reversi :game-id="$route.params.game" @nav="nav" :self-nav="false"/>
</mk-ui>
</template>
@ -14,8 +14,13 @@ export default Vue.extend({
document.documentElement.style.background = '#fff';
},
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);
}
}
}
});