Home > Web Front-end > JS Tutorial > body text

Examples of vue.js nested loops, if judgments, and dynamic deletion

亚连
Release: 2018-05-31 17:28:50
Original
1719 people have browsed it

Below I will share with you an example of vue.js nested loop, if judgment, and dynamic deletion. It has a good reference value and I hope it will be helpful to everyone.

Vue.js is a very popular JavaScript MVVM library. It is built with data-driven and component-based ideas. Compared with Angular.js, Vue.js provides a simpler and easier-to-understand API

app.html




 
	
	vuejs 嵌套循环、if判断
	
	

id 姓名 手机号 城市 通过审核 我的学生 操作
{{item.id}} {{item.name}} {{item.tel}} {{item.province}}_{{item.city}} {{stu.name}},

Copy after login

##The difference between vue1.0 and vue2.0 loop index use

如果是vue1.0这样写:
  1. {{todo.label}}
然后: methods:{ delete:function(index){ this.todos.splice(index,1); } } 如果是vue2.0这样写:
  1. {{todo.label}}
然后 methods:{ delete:function(index){ this.todos.splice(index,1); } }
Copy after login

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

angular5 httpclient example practice

Solving the problem of multiple vue routes sharing one page

An Angular method-level cache annotation (decorator)

The above is the detailed content of Examples of vue.js nested loops, if judgments, and dynamic deletion. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!