這篇文章主要介紹小程序中怎么在wx:for里判斷具體哪一個(gè)頁(yè)面跳轉(zhuǎn),文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
//wx:for循環(huán)選項(xiàng)
<view class='function_container'>
<view class='function_item' bindtap='readData' wx:for="{{functions}}" wx:for-index="idx" wx:for-item="function">
<image class='function_img' src='{{function.pic_url}}' mode='aspectFit' />
<view data-id="{{function.id}}" class='function_name'>{{function.name}}</view>
</view>
</view>
//js
page({
data:{
functions: [
{
"name": "庫(kù)存",
"pic_url": '../image/half-star.png',
},
{
"name": "報(bào)表",
"pic_url": '../image/half-star.png'
},
{
"name": "商品管理",
"pic_url": '../image/half-star.png'
},
{
"name": "訂貨",
"pic_url": '../image/half-star.png'
},
{
"name": "飛機(jī)票",
"pic_url": '../image/half-star.png'
},
{
"name": "火車(chē)票",
"pic_url": '../image/half-star.png'
},
{
"name": "手機(jī)充值",
"pic_url": '../image/half-star.png'
},
{
"name": "水電煤",
"pic_url": '../image/half-star.png'
}
]
},
}
})
以上是“小程序中怎么在wx:for里判斷具體哪一個(gè)頁(yè)面跳轉(zhuǎn)”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!
網(wǎng)站標(biāo)題:小程序中怎么在wx:for里判斷具體哪一個(gè)頁(yè)面跳轉(zhuǎn)-創(chuàng)新互聯(lián)
文章出自:http://chinadenli.net/article14/ghjde.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供手機(jī)網(wǎng)站建設(shè)、網(wǎng)站設(shè)計(jì)公司、網(wǎng)站策劃、App設(shè)計(jì)、網(wǎng)站維護(hù)、定制網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容