view.jsx 556 B

123456789101112131415
  1. import { useFormView } from '@cip/components/hooks/form-input'
  2. import { formInputViewProps } from '../../form-input-props'
  3. import { computed } from 'vue'
  4. export default {
  5. props: formInputViewProps,
  6. setup (props) {
  7. const { proxyOtherValue } = useFormView(props, { maxOtherKey: 3 })
  8. const protocol = computed(() => {
  9. return proxyOtherValue[0].value || 'http:'
  10. })
  11. return () => <div>
  12. {protocol.value}//{props.modelValue}{proxyOtherValue[1].value ? `:${proxyOtherValue[1].value}` : ''}{proxyOtherValue[2].value}
  13. </div>
  14. }
  15. }