Skip to content

Commit

Permalink
fix(radio): hidden default element when no default slot (#1389)
Browse files Browse the repository at this point in the history
* fix(radio): hidden default element when no default slot

* test(radio): update snapshot
  • Loading branch information
chouchouji authored Jan 8, 2024
1 parent 98d9e9c commit 05b090d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ exports[`test form with radio 1`] = `
<div class="var-radio__action var-radio--unchecked var-radio--disabled"><i class="var-icon var-icon--set var-icon-radio-blank var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text var-radio--disabled"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand All @@ -365,7 +365,7 @@ exports[`test form with radio 2`] = `
<div class="var-radio__action var-radio--unchecked"><i class="var-icon var-icon--set var-icon-radio-blank var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand All @@ -381,7 +381,7 @@ exports[`test form with radio 3`] = `
<div class="var-radio__action var-radio--unchecked var-radio--error"><i class="var-icon var-icon--set var-icon-radio-blank var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text var-radio--error"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<div class="var-form-details">
Expand All @@ -408,7 +408,7 @@ exports[`test form with radio 4`] = `
<div class="var-radio__action var-radio--unchecked"><i class="var-icon var-icon--set var-icon-radio-blank var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`test radio group layout direction 1`] = `
<div class="var-radio__action var-radio--unchecked"><i class="var-icon var-icon--set var-icon-radio-blank var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand All @@ -19,7 +19,7 @@ exports[`test radio group layout direction 1`] = `
<div class="var-radio__action var-radio--unchecked"><i class="var-icon var-icon--set var-icon-radio-blank var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand All @@ -40,7 +40,7 @@ exports[`test radio group validation 1`] = `
<div class="var-radio__action var-radio--unchecked var-radio--error"><i class="var-icon var-icon--set var-icon-radio-blank var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text var-radio--error"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand All @@ -51,7 +51,7 @@ exports[`test radio group validation 1`] = `
<div class="var-radio__action var-radio--checked var-radio--error"><i class="var-icon var-icon--set var-icon-radio-marked var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text var-radio--error"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand Down Expand Up @@ -83,7 +83,7 @@ exports[`test radio group validation 2`] = `
<div class="var-radio__action var-radio--checked"><i class="var-icon var-icon--set var-icon-radio-marked var-radio__icon var-radio--with-animation" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand All @@ -94,7 +94,7 @@ exports[`test radio group validation 2`] = `
<div class="var-radio__action var-radio--unchecked"><i class="var-icon var-icon--set var-icon-radio-blank var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand All @@ -113,7 +113,7 @@ exports[`test radio validation 1`] = `
<div class="var-radio__action var-radio--unchecked var-radio--error"><i class="var-icon var-icon--set var-icon-radio-blank var-radio__icon" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text var-radio--error"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<div class="var-form-details">
Expand All @@ -138,7 +138,7 @@ exports[`test radio validation 2`] = `
<div class="var-radio__action var-radio--checked"><i class="var-icon var-icon--set var-icon-radio-marked var-radio__icon var-radio--with-animation" style="transition-duration: 0ms;" var-radio-cover=""></i>
<div class="var-hover-overlay"></div>
</div>
<div class="var-radio__text"></div>
<!--v-if-->
</div>
<transition-stub name="var-form-details" appear="false" persisted="false" css="true">
<!--v-if-->
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/radio/Radio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
[formDisabled || disabled, n('--disabled')]
)
"
v-if="$slots.default"
>
<slot />
</div>
Expand Down

0 comments on commit 05b090d

Please sign in to comment.