File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 2
2
<div :class =" [$attrs.class]" >
3
3
<slot name =" header" :inputElement =" inputElement" :id =" id" :modelValue =" modelValue" :status =" status" v-bind =" $attrs" ></slot >
4
4
<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') " >
6
6
7
7
<input ref =" inputElement" :type =" useType"
8
8
:name =" id"
@@ -68,9 +68,14 @@ function focus() {
68
68
const useType = computed (() => props .type || ' text' )
69
69
const useLabel = computed (() => props .label ?? humanize (toPascalCase (props .id )))
70
70
const usePlaceholder = computed (() => props .placeholder ?? useLabel .value )
71
+ function fixShadow(cls : string ) {
72
+ return props .type === ' range'
73
+ ? cls .replace (' shadow-sm ' , ' ' )
74
+ : cls
75
+ }
71
76
72
77
let ctx: ApiState | undefined = inject (' ApiState' , undefined )
73
78
const errorField = computed (() => errorResponse .call ({ responseStatus: props .status ?? ctx ?.error .value }, props .id ))
74
79
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 ])
76
81
</script >
You can’t perform that action at this time.
0 commit comments