File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 22 <div :class =" [$attrs.class]" >
33 <slot name =" header" :inputElement =" inputElement" :id =" id" :modelValue =" modelValue" :status =" status" v-bind =" $attrs" ></slot >
44 <label v-if =" useLabel" :for =" id" :class =" `block text-sm font-medium text-gray-700 dark:text-gray-300 ${labelClass??''}`" >{{ useLabel }}</label >
5- <div class =" mt-1 relative rounded-md shadow-sm" >
5+ <div : class =" fixShadow(' mt-1 relative shadow-sm rounded-md') " >
66
77 <input ref =" inputElement" :type =" useType"
88 :name =" id"
@@ -68,9 +68,14 @@ function focus() {
6868const useType = computed (() => props .type || ' text' )
6969const useLabel = computed (() => props .label ?? humanize (toPascalCase (props .id )))
7070const usePlaceholder = computed (() => props .placeholder ?? useLabel .value )
71+ function fixShadow(cls : string ) {
72+ return props .type === ' range'
73+ ? cls .replace (' shadow-sm ' , ' ' )
74+ : cls
75+ }
7176
7277let ctx: ApiState | undefined = inject (' ApiState' , undefined )
7378const errorField = computed (() => errorResponse .call ({ responseStatus: props .status ?? ctx ?.error .value }, props .id ))
7479
75- const cls = computed (() => [input .base , errorField .value ? input .invalid : input .valid , props .inputClass ])
80+ const cls = computed (() => [input .base , errorField .value ? input .invalid : fixShadow ( input .valid ) , props .inputClass ])
7681 </script >
You can’t perform that action at this time.
0 commit comments