Vue之循环v-for

下面来继续记录并分享vue相关:

vue也是具有循环和判断的,v-for循环遍历的用法如下所示:

一、遍历数组

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>




vue-input-demo




	
  • {{ item.message }}

二、遍历属性

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>




vue-input-demo




	
  • {{ parentMessage }} - {{ index }} - {{ item.message }}

三、遍历对象

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>




vue-input-demo




	
  • {{ value }}

四、v-for与templet

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>




vue-input-demo




	

你可能感兴趣的:(vue)