mobile.jsx 565 B

123456789101112131415
  1. import { Divider as VantDivider } from 'vant'
  2. import { formInputProps } from '../../form-input-props'
  3. import { useFormInput } from '../../../hooks/form-input'
  4. export default {
  5. props: formInputProps,
  6. setup (props, context) {
  7. const { width } = useFormInput(props, context)
  8. return () => <VantDivider
  9. style={{ width: width.value, color: props.config.textColor, borderColor: props.config.dividerColor }}
  10. content-position={props.config?.contentPosition ?? 'center'}>
  11. {props.modelValue || props.config.defaultValue}
  12. </VantDivider>
  13. }
  14. }