当前位置:网站首页>V-for loop traversal
V-for loop traversal
2022-06-11 18:26:00 【Hello, teacher I'm Dabai】
v-for Loop traversal
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style> .active{
color: red; } </style>
</head>
<body>
<div id="app">
<h2> World wide cat animation </h2>
<ul>
<li v-for="(item, index) in movies" :class="{active: currentIndex === index}" @click="liClick(index)">
{
{item}}
</li>
</ul>
</div>
<!-- from CDN introduce vue.js-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script> const app = new Vue({
// Initialize a VUE example el: '#app', // For page rendering VUE Element of instance data: {
// Defining data movies: [' One man fixes the immortals ', ' Break the vault of heaven ', ' The moon in Qin Dynasty ', ' The heart of the sword ', ' Young song line '], currentIndex: 0 }, methods: {
liClick(index) {
this.currentIndex = index } } }) </script>
</body>
</html>

Browser effect display

边栏推荐
- 牛客刷题——合法括号序列判断
- LDAP 目录服务器的现代化应用
- 牛客刷题——part7
- Sorted circular linked list
- 力扣23题,合并K个升序链表
- NFT platform development NFT mall source code NFT mall development chain game development
- Class question: how to ensure that line table storage can be inserted at any time?
- [C语言]用结构体把最高分的学生输出,可有多个最高分
- 牛客刷题——把字符串转换成整数
- “LSTM之父”新作:一种新方法,迈向自我修正的神经网络
猜你喜欢

VIM common commands

ACL 2022:评估单词多义性不再困扰?一种新的基准“DIBIMT”
![[C语言]用结构体把平均分和低于等于平均分的学生数据输出](/img/c4/263301a22b61c86a3e0df6ad2596f1.png)
[C语言]用结构体把平均分和低于等于平均分的学生数据输出

H.264概念
![[C语言]用结构体把最高分的学生输出,可有多个最高分](/img/4e/836a8f717a2d9bf5f999a934ff4c91.png)
[C语言]用结构体把最高分的学生输出,可有多个最高分

Easycwmp source code analysis

Common interview questions of network and concurrent programming
![[c language] output the average score and the student data below or equal to the average score with the structure](/img/c4/263301a22b61c86a3e0df6ad2596f1.png)
[c language] output the average score and the student data below or equal to the average score with the structure
![[FAQs for novices on the road] about project management](/img/14/68f5e4cead5573fc932350d8d9b06e.png)
[FAQs for novices on the road] about project management

SQL报错注入1
随机推荐
牛客刷题——part8
[C语言]用结构体把最高分的学生输出,可有多个最高分
ubuntu 安装psql以及运行相关命令
264 Concepts
IEDA 底层菜单菜单简介
LDPC 7 - 解码简单例子
Summary of common mysql/redis interview questions
Async leads to unexpected function results and changes the intention of the original code; await is only valid in async functions and the top level bodies of modules
VIM common commands
NR LDPC 打孔-punctured
论工作流选型
力扣34在排序数组中查找元素的第一个和最后一个位置
labelme进行图片数据标注
SISO Decoder for SPC (补充章节1)
viso的常见操作
学习使用LSTM和IMDB评论数据进行情感分析训练
求字符串中最大的 3 位相同数字
关于keil中,while循环条件不成立却无法跳出的问题
[C语言]压缩字符串并添加标记字符
使用Visdom对损失函数进行监控