♻️ refactor: required-tip slot improved
This commit is contained in:
parent
5c89228564
commit
8b138d905e
|
@ -24,12 +24,11 @@ const props = withDefaults(defineProps<IVLabel>(), {
|
|||
:aria-disabled="props.disabled"
|
||||
>
|
||||
{{ props.label }}
|
||||
<slot name="required-type">
|
||||
<span
|
||||
v-if="props.required"
|
||||
:class="{ 'required': props.required }"
|
||||
>*</span>
|
||||
</slot>
|
||||
<template v-if="props.required">
|
||||
<span v-if="props.required" :class="{ 'required': !props.disabled}">
|
||||
<slot name="required-tip">*</slot>
|
||||
</span>
|
||||
</template>
|
||||
<VHint
|
||||
v-if="props.hint"
|
||||
:title="props.hint"
|
||||
|
@ -43,5 +42,8 @@ const props = withDefaults(defineProps<IVLabel>(), {
|
|||
.success {color: var(--text-default-success);}
|
||||
.error {color: var(--text-default-error);}
|
||||
.disabled {color: var(--text-disabled-grey);}
|
||||
.required {color: var(--minor-red-marianne);}
|
||||
.required {
|
||||
color: var(--minor-red-marianne);
|
||||
display: inline;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue
Block a user