iview The [Bug Report] i-switch switch switch cannot set the default value when the disabled state is true. It is false in any case.

oalqel3c  于 6个月前  发布在  其他
关注(0)|答案(3)|浏览(52)

Environment

小程序

https://weapp.iviewui.com/components/switch

Steps to reproduce

使用i-switch开关,设置disabled=true,设置value=true,效果为关闭状态

What is expected?

开关为开启状态

What is actually happening?

开关为关闭状态

这种场景大多在详情页面有这个需求,不允许修改,但是要求能看到状态

edqdpe6u

edqdpe6u1#

Translation of this issue:

Environment

Small program

https://weapp.iviewui.com/components/switch

Steps to reproduce

Use the i-switch switch switch, set disabled = true, set value = true, the effect is closed

What is expected?

Switch on

What is actually happening?

Switch is closed

Most of these scenarios have this requirement on the details page, and no modification is allowed, but the state is required to be visible.

izkcnapc

izkcnapc3#

不出意外的话是你没有使用:

相关问题