html52.com
我爱小程序-开发者交流社区

怎样把值传给wxs?dataset传递失败

<wxs module="slideMovesrc="./slideMove.wxs"></wxs>

<view class="liveRoomContainerbindtap="bigTapdata-width="{{windowWidth}}bindtouchmove="{{slideMove.touchmove}}bindtouchend="{{slideMove.touchend}}bindtouchstart="{{slideMove.touchstart}}">里面嵌套了一些cover-view标签</view>

// 屏幕宽度    windowWidth: wx.getSystemInfoSync().windowWidth   

wxs中,e.target.dataset是{}, width值取不到, 怎么传过去啊?




网友回复

卢霄霄:

currentTarget?

Do What's Worth.:

你在父组件页面获取,然后在传值给wxs处理不更好吗。。。

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付