<template name="odd"> <view> odd </view> </template> <template name="even"> <
view> even </view> </template> // Receive transmission value <template name="msgItem"> <view> <text> {{
index}}: {{msg}} </text> <text> Time: {{time}} </text> </view> </template> <
block wx:for="{{[1, 2, 3, 4, 5]}}"> <template is="{{item % 2 == 0 ? 'even' :
'odd'}}"/> </block> // Define transfer value <template is="msgItem" data="{{...item}}"/> Page({
data: { item: { index: 0, msg: 'this is a template', time: '2016-09-15' } } })
References to templates
<!-- item.wxml --> <template name="item"> <text>{{text}}</text> </template> <
import src="item.wxml"/> <template is="item" data="{{text: 'forbar'}}"/>

Technology
©2019-2020 Toolsou All rights reserved,
hive compress &&hdfs Merge small files I've been drinking soft water for three years ? What is the use of soft water and water softener 《 League of Heroes 》 Mobile game open public test : support iOS/Android Dual platform The situation of receiving and receiving multi-path VaR - Value at risk - Monte Carlo method - Pythonnumpy: The creation of multidimensional array uniapp Summary of page value transfer use C Language makes a very simple airplane game Docker Container data volume ,DockerfileJavaScript Medium Call and Apply