<Checkbox value="1" checked={value.active == 1 ? true : false} onClick={this.handleCheckoutCartSelectone.bind(this, value)} />
<view class="cart-item" wx:for="{{loopArray0}}" wx:for-item="value" wx:for-index="key">
<checkbox value="1" checked="{{value.active == 1 ? true : false}}" bindtap="handleCheckoutCartSelectone"
data-e-handleCheckoutCartSelectone-so="this" data-e-handleCheckoutCartSelectone-a-a="{{value}}"
data-component-path="{{$path}}"></checkbox>
<view class="image">
<image src="{{value.img_url}}" />
</view>
<view class="cart-info">
<view class="name">{{value.name}}</view>
<view class="name">{{value.$loopState__temp3}}</view>
<view class="name">¥{{value.base_product_price}}</view>
<view class="cart-input">
<view class="btn cartLess">-</view>
<input class="weui-input" type="text" value="{{value.qty}}" maxlength="10"
/>
<view class="btn cartAdd">+</view>
</view>
</view>
</view>
恩,目前 bind 传参只能通过将参数附在 wxml 的属性上来进行传参,所以只能编译成这样了
anu的React转小程序已经实现传复杂对象了。



将参数放在wxml是不明智的,这样会导致体积变大。可以通过UUID指用在虚拟DOM中绑定好的事件
https://github.com/RubyLouvre/anu/tree/master/packages/render/miniapp
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
anu的React转小程序已经实现传复杂对象了。
将参数放在wxml是不明智的,这样会导致体积变大。可以通过UUID指用在虚拟DOM中绑定好的事件
https://github.com/RubyLouvre/anu/tree/master/packages/render/miniapp