小程序
小游戏
企业微信
微信支付
扫描小程序码分享
刚进入的时候,组件的点击事件还是好使的,但是一会就失效了,点了也没有反应
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
有没有报错呢?系统版本以及微信版本是什么?
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
没有报错,就是点击没有反应,调试库是2.3.1,组件是
<view class='sidebar'>
<view class='avatar_special'>
<view class='avatar_special_pic radius_half'>
<open-data type="userAvatarUrl" class="pic_fuil"></open-data>
</view>
<view class='avatar_special_text'>
<open-data type="userNickName" class="nowrap"></open-data>
<view wx:for="{{nav}}" class='nav_list' wx:for-itme="item" wx:for-index="idx" wx:key="idx" data-pagePath="{{item.pagePath}}" bindtap='show_content'>
<view class='nav_list_pic'>
<i class="iconfont {{item.iconPath}}" style="font-size:40rpx;"></i>
<view class='nav_list_text'>
<text class=''>{{item.title}}</text>
js是
data: {
nav:[
{
title:"首页",
pagePath:"../bar/index",
iconPath:"icon-shouye"
},
title:"今日客户",
pagePath:"../person/person",
iconPath:"icon-kehu"
title:"今日收支",
pagePath:"../income_expenditure/income_expenditure",
iconPath:"icon-shouzhiliushui"
}
]
methods: {
show_content(e){
wx.navigateTo({
url:e.currentTarget.dataset.pagepath
})
麻烦提供这种格式的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
反正是有这个问题,我改用navigator了,就解决了,下次再有问题我会按照你的方式
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
有没有报错呢?系统版本以及微信版本是什么?
麻烦提供能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
没有报错,就是点击没有反应,调试库是2.3.1,组件是
<view class='sidebar'>
<view class='avatar_special'>
<view class='avatar_special_pic radius_half'>
<open-data type="userAvatarUrl" class="pic_fuil"></open-data>
</view>
<view class='avatar_special_text'>
<open-data type="userNickName" class="nowrap"></open-data>
</view>
</view>
<view wx:for="{{nav}}" class='nav_list' wx:for-itme="item" wx:for-index="idx" wx:key="idx" data-pagePath="{{item.pagePath}}" bindtap='show_content'>
<view class='nav_list_pic'>
<i class="iconfont {{item.iconPath}}" style="font-size:40rpx;"></i>
</view>
<view class='nav_list_text'>
<text class=''>{{item.title}}</text>
</view>
</view>
</view>
js是
data: {
nav:[
{
title:"首页",
pagePath:"../bar/index",
iconPath:"icon-shouye"
},
{
title:"今日客户",
pagePath:"../person/person",
iconPath:"icon-kehu"
},
{
title:"今日收支",
pagePath:"../income_expenditure/income_expenditure",
iconPath:"icon-shouzhiliushui"
}
]
},
methods: {
show_content(e){
wx.navigateTo({
url:e.currentTarget.dataset.pagepath
})
}
}
麻烦提供这种格式的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
反正是有这个问题,我改用navigator了,就解决了,下次再有问题我会按照你的方式