mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 23:19:37 +00:00
26 lines
578 B
Vue
26 lines
578 B
Vue
<script setup lang="ts">
|
|
import { Label } from '@/components/ui/label'
|
|
import { Textarea } from '@/components/ui/textarea'
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
name: string
|
|
label?: string
|
|
placeholder?: string
|
|
rows?: number
|
|
}>(),
|
|
{
|
|
rows: 3,
|
|
}
|
|
)
|
|
|
|
const { value } = useField<string>(props.name)
|
|
</script>
|
|
|
|
<template>
|
|
<div class="flex flex-col gap-2">
|
|
<Label v-if="label">{{ label }}</Label>
|
|
<Textarea v-model="value" :placeholder="placeholder" :rows="rows" v-bind="$attrs" />
|
|
</div>
|
|
</template>
|