index.jsx 930 B

12345678910111213141516171819202122232425262728293031
  1. import { defineComponent } from 'vue'
  2. import { formInputProps } from '../../form-input-props'
  3. import { useFormInput } from '@cip/components/hooks/form-input'
  4. import { ElInput } from 'element-plus'
  5. import './index.less'
  6. export default defineComponent({
  7. props: formInputProps,
  8. setup (props, context) {
  9. const FormInput = useFormInput(props, context)
  10. return () => <div class={'basic-link'}>
  11. <ElInput
  12. class={'basic-link__name'}
  13. modelValue={props.otherValue}
  14. onUpdate:modelValue={FormInput.emitOtherValue}
  15. clearable={true}>
  16. {{
  17. prepend: () => <span>链接名称</span>
  18. }}
  19. </ElInput>
  20. <ElInput
  21. class={'basic-link__href'}
  22. modelValue={props.modelValue}
  23. onUpdate:modelValue={FormInput.emitInput}
  24. clearable={true}>
  25. {{
  26. prepend: () => <span>链接地址</span>
  27. }}
  28. </ElInput>
  29. </div>
  30. }
  31. })