2018-08-03 22:34:58 +09:00
|
|
|
<template>
|
|
|
|
<component :is="ui ? 'mk-ui' : 'div'">
|
2018-08-05 13:40:26 +09:00
|
|
|
<mk-reversi :game-id="$route.params.game" @nav="nav" :self-nav="false"/>
|
2018-08-03 22:34:58 +09:00
|
|
|
</component>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
props: {
|
|
|
|
ui: {
|
|
|
|
default: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
2018-08-05 13:40:26 +09:00
|
|
|
nav(game, actualNav) {
|
|
|
|
if (actualNav) {
|
2018-09-01 23:12:51 +09:00
|
|
|
this.$router.push(`/reversi/${game.id}`);
|
2018-08-05 13:40:26 +09:00
|
|
|
} else {
|
|
|
|
// TODO: https://github.com/vuejs/vue-router/issues/703
|
2018-09-01 23:12:51 +09:00
|
|
|
this.$router.push(`/reversi/${game.id}`);
|
2018-08-05 13:40:26 +09:00
|
|
|
}
|
|
|
|
}
|
2018-08-03 22:34:58 +09:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|