Skip to content

Update u-checkbox.vue inactiveColor属性需要设置在checkbox背景色上,目前只是应用于border-color上 #1033

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@
iconWrapStyle() {
// checkbox的整体样式
const style = {}
style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : '#ffffff'
style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor
style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : (this.elInactiveColor === '#c8c9cc' ? "#ffffff" : this.elInactiveColor)
style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : (this.elInactiveColor === 'transparent' ? "#c8c9cc" : this.elInactiveColor)
style.width = uni.$u.addUnit(this.elSize)
style.height = uni.$u.addUnit(this.elSize)
// 如果是图标在右边的话,移除它的右边距
Expand Down