Skip to content

Commit

Permalink
fix(switch): fix switch button assign value (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
gehaiyi authored May 5, 2022
1 parent 758ad95 commit 8df40b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/components/src/switch/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { connect, mapProps } from '@formily/vue'
import { Switch as AntdSwitch } from 'ant-design-vue'

export const Switch = connect(AntdSwitch, mapProps({ readOnly: 'read-only' }))
export const Switch = connect(
AntdSwitch,
mapProps({ readOnly: 'read-only', value: 'checked' })
)

export default Switch

0 comments on commit 8df40b2

Please sign in to comment.