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