康复游戏启动页
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
630 B

<template>
<button @click="$router.back()">返回</button>
游戏列表选择
<div v-for="item in games" :key="item.id" @click="openGame(item.name)">
{{ item.text }}
</div>
</template>
<script setup>
import { useStore } from 'vuex';
import { computed } from 'vue';
const store = useStore();
const games = computed(() => store.getters.selectedGames);
/**
* 根据game.name 跳转到对应的游戏界面
* @param {string} gameName 游戏name与服务器路径对应
*/
function openGame(gameName) {
window.location.href = `https://www.tall.wiki/kangfu/game/${gameName}/win`;
}
</script>
<style scoped></style>