v-for 迭代整数
v-for 迭代整数
v-for 也可以循环整数
<!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>Document</title>
<script src="https://unpkg.com/vue@next"></script>
</head>
<body>
<div id="app">
<ul>
<template v-for="n in 100">
<li>{{n}}</li>
</template>
</ul>
</div>
<script>
const app = Vue.createApp({
data() {
return {
flag: false,
}
},
})
app.mount('#app')
</script>
</body>
</html>

本文来自博客园,作者:wjxuriel,转载请注明原文链接:https://www.cnblogs.com/my-blog-site/p/16198981.html

浙公网安备 33010602011771号