mobile.jsx 576 B

12345678910111213141516
  1. import { Switch as VanSwitch } from 'vant'
  2. import { useFormInput } from '../../../hooks/form-input'
  3. import { formInputProps, fromInputEmits } from '../../form-input-props'
  4. export default {
  5. props: formInputProps,
  6. emits: [...fromInputEmits],
  7. setup (props, context) {
  8. const { proxyValue, securityConfig } = useFormInput(props, context)
  9. return () => <VanSwitch
  10. v-model={proxyValue.value}
  11. disabled={props.disabled}
  12. activeValue={securityConfig.value.activeValue ?? true}
  13. inactiveValue={securityConfig.value.inactiveValue ?? false}
  14. />
  15. }
  16. }