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

fix(): 解决am-checkbox在小程序插件中样式展示异常的问题 #16

Merged
merged 1 commit into from
Apr 8, 2020

Conversation

372623460jh
Copy link
Contributor

修改am-checkbox组件,使其不依赖于基础组件的类名a-checkbox-checked,从而解决小程序插件内使用am-checkbox组件时类名加前缀引起的样式展示异常的问题。

@linxz linxz merged commit 84c0cfb into Alibaba-mp:master Apr 8, 2020
@FrameJ
Copy link

FrameJ commented Apr 16, 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, }) }, });

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 this pull request may close these issues.

3 participants