代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
#mutable{
height: 100vh;
font-size: 24px;
align-items: center;
color: red;
}
</style>
</head>
<body>
<div id="mutable">
<table>
<tbody>
<tr v-for="n in 9">
<td v-for="m in n">
{{n}}*{{m}}={{m*n}}
</td>
</tr>
</tbody>
</table>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/3.0.5/vue.global.js"></script>
<script>
const app={
data(){
return{
num:9,
};
},
}
Vue.createApp(app).mount("#mutable");
</script>
</body>
</html>
运行结果: