We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.0.7之后外部改变checked绑定值,am-checkbox不再响应变化
<view> <am-checkbox checked="{{checked1}}" onChange="checkChange" data-index="1"></am-checkbox> <am-checkbox checked="{{checked2}}" onChange="checkChange" data-index="2"></am-checkbox> <am-checkbox checked="{{checked3}}" onChange="checkChange" data-index="3"></am-checkbox> <button size="default" type="primary" onTap="checkAll">CheckAll</button> </view>
Page({ data: { checked1: false, checked2: false, checked3: false, }, checkChange(e) { console.log(e) this.setData({ ['checked' + e.currentTarget.dataset.index]: e.detail.value, }) }, checkAll(e) { console.log(e) this.setData({ checked1: true, checked2: true, checked3: true, }) }, });
Originally posted by @FrameJ in #16 (comment)
The text was updated successfully, but these errors were encountered:
1.0.9 版本中已加入可控操作
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
1.0.7之后外部改变checked绑定值,am-checkbox不再响应变化
<view> <am-checkbox checked="{{checked1}}" onChange="checkChange" data-index="1"></am-checkbox> <am-checkbox checked="{{checked2}}" onChange="checkChange" data-index="2"></am-checkbox> <am-checkbox checked="{{checked3}}" onChange="checkChange" data-index="3"></am-checkbox> <button size="default" type="primary" onTap="checkAll">CheckAll</button> </view>
Page({ data: { checked1: false, checked2: false, checked3: false, }, checkChange(e) { console.log(e) this.setData({ ['checked' + e.currentTarget.dataset.index]: e.detail.value, }) }, checkAll(e) { console.log(e) this.setData({ checked1: true, checked2: true, checked3: true, }) }, });
Originally posted by @FrameJ in #16 (comment)
The text was updated successfully, but these errors were encountered: