最近接触了小程序,和以前的一些js的框架不一样的是,当页面绑定一个方法时,这里不会带参数,如下所示:
<view class="page">
<view class="page__bd">
<view class="weui-grids">
<block wx:for="{
{list}}">
<navigator wx:if="{
{item.parentId!=1}}" class="weui-grid" hover-class="weui-grid_active"
url="" bindtap='navigateToPage' id='{
{item.id}}' data-name='{
{item.name}}' data-showType='{
{item.showType}}'>
<image class="weui-grid__icon" src="{
{url}}{
{item.image}}" />
<view class="weui-grid__label">{
{item.name}}</view>
</navigator>
</block&