Skip to content

Commit

Permalink
fix(Radio): update style
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao committed Sep 12, 2024
1 parent b564c03 commit 1f5caad
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions src/radio/__test__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`Radio Radio align demo works fine 1`] = `
<align>
<t-radio
allowUncheck="{{true}}"
defaultChecked="{{true}}"
label="单选"
value="radio1"
Expand All @@ -11,6 +12,7 @@ exports[`Radio Radio align demo works fine 1`] = `
class="block"
/>
<t-radio
allowUncheck="{{true}}"
defaultChecked="{{true}}"
label="单选"
placement="right"
Expand Down Expand Up @@ -212,6 +214,7 @@ exports[`Radio Radio status demo works fine 1`] = `
exports[`Radio Radio theme demo works fine 1`] = `
<theme>
<t-radio
allowUncheck="{{true}}"
defaultChecked="{{true}}"
icon="line"
label="单选"
Expand All @@ -221,6 +224,7 @@ exports[`Radio Radio theme demo works fine 1`] = `
style="height: 32rpx"
/>
<t-radio
allowUncheck="{{true}}"
defaultChecked="{{true}}"
icon="dot"
label="单选"
Expand Down
4 changes: 2 additions & 2 deletions src/radio/_example/align/index.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<t-radio value="radio1" label="单选" default-checked />
<t-radio value="radio1" allow-uncheck label="单选" default-checked />

<view class="block"></view>

<t-radio value="radio2" label="单选" placement="right" default-checked />
<t-radio value="radio2" allow-uncheck label="单选" placement="right" default-checked />
4 changes: 2 additions & 2 deletions src/radio/_example/theme/index.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<t-radio default-checked="{{true}}" icon="line" label="单选" />
<t-radio default-checked="{{true}}" allow-uncheck icon="line" label="单选" />

<view class="gutter" style="height: 32rpx"></view>

<t-radio default-checked="{{true}}" icon="dot" label="单选" />
<t-radio default-checked="{{true}}" allow-uncheck icon="dot" label="单选" />
12 changes: 6 additions & 6 deletions src/radio/radio.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
vertical-align: middle;
font-size: @radio-font-size;
background: @radio-bg-color;
position: relative;

&:focus {
outline: 0;
}
Expand Down Expand Up @@ -129,9 +129,9 @@
}

&-dot {
width: 84rpx;
height: 84rpx;
border: 3px solid @radio-icon-checked-color;
width: calc((@radio-icon-size - 6rpx) * 2);
height: calc((@radio-icon-size - 6rpx) * 2);
border: 6rpx solid @radio-icon-checked-color;
border-radius: 50%;
position: absolute;
top: 50%;
Expand All @@ -145,8 +145,8 @@
&::after {
content: '';
display: block;
width: 48rpx;
height: 48rpx;
width: @radio-icon-size;
height: @radio-icon-size;
background: @radio-icon-checked-color;
border-radius: 50%;
}
Expand Down

0 comments on commit 1f5caad

Please sign in to comment.