feat(Form): use nuxt useId to bind input labels (#1211)

This commit is contained in:
Romain Hamel
2024-01-31 18:22:02 +01:00
committed by GitHub
parent be37daec56
commit 27c71fa40e
5 changed files with 20 additions and 36 deletions

View File

@@ -38,6 +38,7 @@
</template>
<script lang="ts">
import { useId } from '#app'
import { computed, defineComponent, provide, inject, ref, toRef } from 'vue'
import type { Ref, PropType } from 'vue'
import { useUI } from '../../composables/useUI'
@@ -112,7 +113,7 @@ export default defineComponent({
})
const size = computed(() => ui.value.size[props.size ?? config.default.size])
const inputId = ref()
const inputId = ref(useId())
provide<InjectedFormGroupValue>('form-group', {
error,