提交 427144f7 编写于 作者: d-u-a's avatar d-u-a

fix: vue3 nvue switch组件disabled属性无效的问题

上级 8a4ffb3a
...@@ -75,14 +75,18 @@ export default defineComponent({ ...@@ -75,14 +75,18 @@ export default defineComponent({
useListeners(props, { 'label-click': _onClick }) useListeners(props, { 'label-click': _onClick })
return () => { return () => {
const { color, type } = props const { color, type, disabled } = props
return ( return (
<div ref={rootRef}> <div ref={rootRef}>
{type === SwitchType.switch ? ( {type === SwitchType.switch ? (
<dc-switch <dc-switch
{...{ dataUncType: 'uni-switch' }} {...{ dataUncType: 'uni-switch' }}
{...listeners} {...listeners}
{...{ checked: switchChecked.value, color: color }} {...{
checked: switchChecked.value,
color: color,
disabled: disabled,
}}
style={DCSwitchSize} style={DCSwitchSize}
/> />
) : null} ) : null}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册