Skip to content
New issue

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不再响应变化 #17

Closed
FrameJ opened this issue Apr 17, 2020 · 1 comment
Closed

Comments

@FrameJ
Copy link

FrameJ commented Apr 17, 2020

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)

@linxz
Copy link
Collaborator

linxz commented May 7, 2020

1.0.9 版本中已加入可控操作

@linxz linxz closed this as completed May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants