云
2026-09-29 07aab8bb335132d5dc56f2b000301457079e8539
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<script lang="ts" setup>
import { Slot } from 'reka-ui';
 
import { useFormField } from './useFormField';
 
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
</script>
 
<template>
  <Slot
    :id="formItemId"
    data-slot="form-control"
    :aria-describedby="
      !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`
    "
    :aria-invalid="!!error"
  >
    <slot></slot>
  </Slot>
</template>