Add intro for text field
This commit is contained in:
parent
54efebf12e
commit
a4a2a2b3fd
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<v-text type="text" :required="field.required" :name="field.key" :label="field.name" :id="field.key" :hint="field.hint" v-model="inner"></v-text>
|
||||
<v-text type="text" :required="field.required" :name="field.key" :label="field.name" :id="field.key" :hint="field.hint" :intro="field.intro" v-model="inner"></v-text>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="text-sm text-gray-600 mb-4" v-text="intro" v-if="intro"></div>
|
||||
<label class="w-full border border-solid border-gray-500 focus-within:border-primary rounded-lg relative flex">
|
||||
<input
|
||||
:id="id"
|
||||
|
@ -16,6 +18,7 @@
|
|||
</div>
|
||||
<field-label :name="label" :required="required"></field-label>
|
||||
</label>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
@ -70,6 +73,11 @@ const props = defineProps({
|
|||
validator: (value) => value === null || typeof value === 'string',
|
||||
default: () => null,
|
||||
},
|
||||
intro: {
|
||||
required: false,
|
||||
validator: (value) => value === null || typeof value === 'string',
|
||||
default: () => null,
|
||||
},
|
||||
});
|
||||
|
||||
const presentMax = computed(() => {
|
||||
|
|
Loading…
Reference in New Issue