进行了关卡设计,小修改
代码
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Game</title>
</head>
<link rel="stylesheet" href="./game.css">
<body>
<div id="app">
<div v-for="index1 in 3" class="picbox">
<div @click="change(index1, index2)" v-for="index2 in 3" class="pic">
<img src="./pic/forest.png" alt="" v-show="show(index1, index2)">
<img src="./pic/desert.png" alt="" v-show="!show(index1, index2)">
</div>
</div>
<button @click="start" v-show="clickTimes===0">开始</button>
<button @click