index.jsx 848 B

1234567891011121314151617181920212223
  1. import CipUrlEditor from '../../../cip-url-editor'
  2. import { useFormInput } from '@cip/components/hooks/form-input'
  3. import { formInputProps, fromInputEmits } from '../../form-input-props'
  4. export default {
  5. name: 'BasicUrlEditor',
  6. props: formInputProps,
  7. emits: [...fromInputEmits],
  8. setup (props, ctx) {
  9. const { securityConfig, width, proxyValue, proxyOtherValue } = useFormInput(props, ctx, { maxOtherKey: 3 })
  10. return () => <CipUrlEditor
  11. v-models={[
  12. [proxyValue.value, 'host'],
  13. [proxyOtherValue[0].value, 'protocol'],
  14. [proxyOtherValue[1].value, 'port'],
  15. [proxyOtherValue[2].value, 'path']
  16. ]}
  17. style={{ width: width.value }}
  18. portMin={securityConfig.value.portMin}
  19. portMax={securityConfig.value.portMax}
  20. disabledConfig={securityConfig.value.disabledConfig}
  21. />
  22. }
  23. }