File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ const shouldHaveLabel = computed(() => {
58
58
/>
59
59
</div >
60
60
61
+ <div v-if =" fieldComponent && fieldComponent.hint" class =" hints" >
62
+ <span class =" hint" >{{ fieldComponent.hint }}</span >
63
+ </div >
64
+
61
65
<div v-if =" fieldComponent && fieldComponent.errors.length" class =" errors help-block" >
62
66
<template v-for =" error in fieldComponent .errors " :key =" error " >
63
67
<span class =" error" >{{ error }}</span > <br >
@@ -74,6 +78,11 @@ const shouldHaveLabel = computed(() => {
74
78
margin-left : .2rem ;
75
79
}
76
80
81
+ .hint {
82
+ color : gray ;
83
+ font-size : 90% ;
84
+ }
85
+
77
86
.errors {
78
87
color : red ;
79
88
font-size : .8rem ;
Original file line number Diff line number Diff line change @@ -235,8 +235,17 @@ export default {
235
235
*/
236
236
isReadOnly ( ) {
237
237
return this . determineDynamicAttribute ( 'readonly' )
238
- }
238
+ } ,
239
239
240
+ /**
241
+ * Compute the hint to be displayed underneath the field input element.
242
+ * Should return a string value.
243
+ *
244
+ * @returns {String }
245
+ */
246
+ hint ( ) {
247
+ return this . determineDynamicAttribute ( 'hint' )
248
+ }
240
249
241
250
}
242
251
You can’t perform that action at this time.
0 commit comments