Appearance
Radio 单选
*UI备注
此模块为须严格遵守设计规范的模块
CSS样式
全部radio样式代码:
查看代码
css
/* HnuiIcon */
@import url('./icon.css');
/* 全局css变量 */
:root {
/* #region vars-BrandColor */
/* 品牌色 */
--hnui-brand-color: #1f78ff;
--hnui-brand-color1: #005ce5;
--hnui-brand-color2: #4b83f7;
--hnui-brand-color3: #3384ff;
--hnui-brand-color4: #599bff;
--hnui-brand-color5: #80b2ff;
--hnui-brand-color6: #b2d1ff;
--hnui-brand-color7: #cce0ff;
--hnui-brand-color8: #d9e8ff;
--hnui-brand-color9: #ebf3ff;
--hnui-brand-color10: #f2f7ff;
/* 状态颜色 */
--hnui-brand-color-normal: var(--hnui-brand-color);
--hnui-brand-color-hover: var(--hnui-brand-color3);
--hnui-brand-color-active: var(--hnui-brand-color1);
--hnui-brand-color-elected: var(--hnui-brand-color9);
--hnui-brand-color-disabled: var(--hnui-brand-color7);
--hnui-brand-color-disabled-border: var(--hnui-brand-color6);
--hnui-brand-color-disabled-bg: var(--hnui-brand-color10);
/* #endregion vars-BrandColor */
/* #region vars-DomainColor */
/* 功能色 */
--hnui-success-color: #2ba471;
--hnui-success-hover-color: #51bd90;
--hnui-success-active-color: #2ba471;
--hnui-warning-color: #faad14;
--hnui-warning-hover-color: #ffc146;
--hnui-warning-active-color: #db960b;
--hnui-danger-color: #ff4d4d;
--hnui-danger-hover-color: #ff7676;
--hnui-danger-active-color: #d82a2a;
--hnui-info-color: #8d97a6;
--hnui-info-hover-color: #b2b7c0;
--hnui-info-active-color: #707a89;
/* #endregion vars-DomainColor */
/* #region vars-NeutralColor */
/* 中性色 */
/* 标题文字 */
--hnui-neutral-color-1: #2d2e33;
/* 正文、重要信息文字、按钮文字、输入框正常状态文字等 */
--hnui-neutral-color-2: #43454d;
/* 内容文字、说明叙述文字 */
--hnui-neutral-color-3: #5d606a;
/* 提示性文字、辅助文本 */
--hnui-neutral-color-4: #9298a0;
/* 禁用文本 */
--hnui-neutral-color-5: #b7bdc7;
/* 描边格描边、输入文本描边、下拉选择描边等 */
--hnui-neutral-color-6: #dfe2e7;
/* 全局背景、禁用状态、分割线等 */
--hnui-neutral-color-7: #f0f2f5;
/* 最低颜色等 */
--hnui-neutral-color-8: #fafbfc;
/* #endregion vars-NeutralColor */
/* 默认文字颜色 */
--hnui-text-color: var(--hnui-neutral-color-2);
--hnui-info-bg: #eceff4;
--hnui-info-bg2: #e7e7e7;
--hnui-color-white: #fff;
--hnui-color-black: #000;
--hnui-border-width: 1px;
--hnui-border-dashed-width: 2px;
--hnui-border-color: var(--hnui-neutral-color-6);
--hnui-disabled-bg-color: var(--hnui-neutral-color-7);
--hnui-disabled-color: var(--hnui-neutral-color-5);
--hnui-control-height: 32px;
--hnui-control-height-sm: 24px;
--hnui-control-height-lg: 40px;
--hnui-control-transparent: transparent;
}
.dark {
--hnui-brand-color6: rgb(50, 59, 74);
--hnui-brand-color7: #30353d;
--hnui-brand-color8: #42484f;
--hnui-brand-color9: #4c4f54;
--hnui-brand-color10: #29292c;
/* 中性色 */
/* 标题文字 */
--hnui-neutral-color-1: #c4c8dc;
/* 正文、重要信息文字、按钮文字、输入框正常状态文字等 */
--hnui-neutral-color-2: #b9bed3;
/* 内容文字、说明叙述文字 */
--hnui-neutral-color-3: #afb5c7;
/* 提示性文字、辅助文本 */
--hnui-neutral-color-4: #6a6f75;
/* 禁用文本 */
--hnui-neutral-color-5: #53565b;
/* 描边格描边、输入文本描边、下拉选择描边等 */
--hnui-neutral-color-6: #59595a;
/* 全局背景、禁用状态、分割线等 */
--hnui-neutral-color-7: #343535;
/* 最低颜色等 */
--hnui-neutral-color-8: #151516;
--hnui-info-bg: #393b3d;
--hnui-color-white: #000;
--hnui-color-black: #fff;
--hnui-control-transparent: transparent;
}
*,
::before,
::after {
box-sizing: border-box;
}
body {
color: var(--hnui-neutral-color-2);
}
/* #region vars-FontFamily */
@font-face {
font-family: 'DIN';
src: url('/fonts/D-DIN-PRO/D-DIN-PRO.woff2') format('woff2'),
url('/fonts/D-DIN-PRO/D-DIN-PRO.woff') format('woff'),
url('/fonts/D-DIN-PRO/D-DIN-PRO.ttf') format('truetype'),
url('/fonts/D-DIN-PRO/D-DIN-PRO.eot') format('embedded-opentype'),
url('/fonts/D-DIN-PRO/D-DIN-PRO.svg') format('svg');
font-weight: normal;
font-style: normal;
}
/* 使用数字字体 */
.use-font {
font-family: DIN;
}
/* #endregion vars-FontFamily */
/* #region vars-BoxShadow */
/* 一级投影(默认向下) */
.hnui-box-shadow {
box-shadow: 0px 6px 16px 6px rgba(0, 0, 0, 0.18);
}
.hnui-box-shadow.hover,
.hnui-box-shadow:hover {
box-shadow: 0px 6px 16px 6px rgba(31, 120, 255, 0.18);
}
/* 二级投影(默认向下) */
.hnui-box-shadow_l2 {
box-shadow: 0px 6px 16px 6px rgba(0, 0, 0, 0.12);
}
.hnui-box-shadow_l2.hover,
.hnui-box-shadow_l2:hover {
box-shadow: 0px 6px 16px 6px rgba(31, 120, 255, 0.12);
}
/* 三级投影(默认向下) */
.hnui-box-shadow_l3 {
box-shadow: 0px 6px 16px 6px rgba(0, 0, 0, 0.06);
}
.hnui-box-shadow_l3.hover,
.hnui-box-shadow_l3:hover {
box-shadow: 0px 6px 16px 6px rgba(31, 120, 255, 0.06);
}
/* #endregion vars-BoxShadow */css
.hnui-radio {
display: inline-flex;
align-items: center;
min-height: 1.5rem;
padding-left: 1.5em;
}
.hnui-radio-input {
--hnui-radio-bg: transparent;
width: 16px;
height: 16px;
margin: 0 4px 0 0;
background-color: var(--hnui-radio-bg);
background-image: var(--hnui-radio-bg-image);
background-repeat: no-repeat;
background-position: center;
background-size: contain;
border: var(--hnui-border-width) solid var(--hnui-border-color);
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
-webkit-print-color-adjust: exact;
color-adjust: exact;
print-color-adjust: exact;
cursor: pointer;
}
.hnui-radio .hnui-radio-input {
float: left;
margin-left: -1.5em;
}
.hnui-radio-input[type="radio"] {
border-radius: 50%;
}
.hnui-radio-input:checked {
background-color: transparent;
border-color: var(--hnui-brand-color-normal);
}
.hnui-radio.hover .hnui-radio-input:not(:disabled),
.hnui-radio:hover .hnui-radio-input:not(:disabled) {
border-color: var(--hnui-brand-color-normal);
}
.hnui-radio-input:disabled:checked[type="radio"] {
--hnui-radio-bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='2' fill='%23dfe2e7'/%3E%3C/svg%3E");
}
.hnui-radio-input:checked[type="radio"] {
--hnui-radio-bg-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='2' fill='%231f78ff'/%3E%3C/svg%3E");
}
.hnui-radio.disabled .hnui-radio-label,
.hnui-radio:not(.disabled) .hnui-radio-input:disabled + .hnui-radio-label,
fieldset:disabled .hnui-radio .hnui-radio-label {
cursor: not-allowed;
pointer-events: none;
color: var(--hnui-disabled-color);
}
.hnui-radio.disabled .hnui-radio-label .hnui-radio-input,
.hnui-radio.disabled .hnui-radio-input:not(:disabled),
.hnui-radio:not(.disabled) .hnui-radio-input:disabled,
fieldset:disabled .hnui-radio:not(.disabled) .hnui-radio-input:not(:disabled) {
background-color: var(--hnui-disabled-bg-color);
border-color: var(--hnui-border-color);
pointer-events: none;
cursor: not-allowed;
}
.hnui-radio-label {
display: inline-flex;
align-items: center;
cursor: pointer;
}
.hnui-radio-group {
display: inline-block;
white-space: nowrap;
}
.hnui-radio-group.disabled {
opacity: 0.36;
}
.hnui-radio-group.disabled.hnui-radio-group input,
.hnui-radio-group.disabled.hnui-radio-group label {
pointer-events: none;
}
.hnui-radio-group .hnui-radio-label {
--hnui-label-padding-x: 22px;
--hnui-label-padding-y: 5px;
display: inline-flex;
align-items: center;
position: relative;
z-index: 0;
line-height: var(--hnui-label-padding-x);
padding: var(--hnui-label-padding-y) var(--hnui-label-padding-x);
border: var(--hnui-border-width) solid var(--hnui-border-color);
border-radius: 3px;
background-color: transparent;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
transition: color 0.16s ease-in-out, background-color 0.16s ease-in-out, border-color 0.16s ease-in-out, box-shadow 0.16s ease-in-out;
}
.hnui-radio-group.hnui-radio-sm .hnui-radio-label {
--hnui-label-padding-x: 22px;
--hnui-label-padding-y: 1px;
font-size: 12px;
}
.hnui-radio-group.hnui-radio-lg .hnui-radio-label {
--hnui-label-padding-x: 22px;
--hnui-label-padding-y: 9px;
font-size: 16px;
}
.hnui-radio.hnui-radio-sm {
font-size: 12px;
}
.hnui-radio.hnui-radio-lg {
font-size: 16px;
}
.hnui-radio-group .hnui-radio-input:not(:disabled) + .hnui-radio-label.hover,
.hnui-radio-group .hnui-radio-input:not(:disabled) + .hnui-radio-label:hover {
color: var(--hnui-brand-color-normal);
}
.hnui-radio-group .hnui-radio-input {
position: absolute;
clip: rect(0, 0, 0, 0);
pointer-events: none;
}
.hnui-radio-group .hnui-radio-label.checked.hnui-radio-label,
.hnui-radio-group .hnui-radio-input:checked.hnui-radio-input + .hnui-radio-label {
background: var(--hnui-brand-color-normal);
border-color: var(--hnui-brand-color-normal);
color: #fff;
z-index: 1;
}
.hnui-radio-group.hnui-radio-outline .hnui-radio-label.checked,
.hnui-radio-group .hnui-radio-input:checked + .hnui-radio-label.hnui-radio-outline,
.hnui-radio-group.hnui-radio-outline .hnui-radio-input:checked + .hnui-radio-label {
background: transparent;
border-color: var(--hnui-brand-color-normal);
color: var(--hnui-brand-color-active);
}
.hnui-radio-group > .hnui-radio-group:not(:last-child) > .hnui-radio-label,
.hnui-radio-group > .hnui-radio-label.dropdown-toggle-split:first-child,
.hnui-radio-group > .hnui-radio-label:not(:last-child):not(.dropdown-toggle) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.hnui-radio-group > .hnui-radio-group:not(:first-child),
.hnui-radio-group > :not(.hnui-radio-input:first-child) + .hnui-radio-label {
margin-left: calc(var(--hnui-border-width) * -1);
}
.hnui-radio-group > .hnui-radio-group:not(:first-child) > .hnui-radio-label,
.hnui-radio-group > .hnui-radio-label:nth-child(n + 3),
.hnui-radio-group > :not(.hnui-radio-input) + .hnui-radio-label {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.hnui-radio-group .hnui-radio-input:disabled:not(:checked) + .hnui-radio-label {
color: var(--hnui-disabled-color);
cursor: not-allowed;
pointer-events: none;
}
.hnui-radio-group .hnui-radio-input:disabled:checked + .hnui-radio-label {
cursor: not-allowed;
pointer-events: none;
color: var(--hnui-brand-color-disabled-border);
background: var(--hnui-brand-color-disabled-bg);
border-color: var(--hnui-brand-color-disabled-border);
}
.hnui-radio-group.hnui-radio-outline .hnui-radio-input:disabled:checked + .hnui-radio-label {
background: transparent;
}
.hnui-radio-group.hnui-radio-filled {
background: var(--hnui-info-bg);
border-radius: 3px;
}
.hnui-radio-group.hnui-radio-filled .hnui-radio-label {
background: var(--hnui-info-bg);
border-color: var(--hnui-info-bg);
}
.hnui-radio-group.hnui-radio-filled .hnui-radio-label {
--ctp-border-width: 2px;
--hnui-label-padding-f-x: calc(var(--hnui-label-padding-x) - var(--ctp-border-width) / 2);
--hnui-label-padding-f-y: calc(var(--hnui-label-padding-y) - var(--ctp-border-width) / 2);
position: relative;
border-width: var(--ctp-border-width);
padding: var(--hnui-label-padding-f-y) var(--hnui-label-padding-f-x);
}
.hnui-radio-group.hnui-radio-filled.hnui-radio-group .hnui-radio-label.hover,
.hnui-radio-group.hnui-radio-filled.hnui-radio-group .hnui-radio-label:hover {
color: var(--hnui-color-black);
}
.hnui-radio-group.hnui-radio-filled .hnui-radio-label.checked,
.hnui-radio-group.hnui-radio-filled .hnui-radio-input:checked + .hnui-radio-label {
background: var(--hnui-color-white);
border-color: var(--hnui-info-bg);
border-radius: 5px;
color: var(--hnui-neutral-color-2);
}基础单选
默认选中,在<input type="radio">上设置checked属性;单选组合,相同name的值为一组选项,如:name="fieldName"
Base
Button
Outline
Filled
html
<div class="hnui-radio">
<input class="hnui-radio-input" type="radio" name="fieldName" id="radio1" value="1" />
<label class="hnui-radio-label" for="radio1">未选中</label>
</div>
<div class="hnui-radio">
<!-- input type="radio" 放在 label标签内 -->
<label class="hnui-radio-label">
<input type="radio" class="hnui-radio-input" name="fieldName" value="2" checked />
已选中
</label>
</div>html
<div class="hnui-radio-group">
<input class="hnui-radio-input" type="radio" name="fieldName2" value="1" id="radio_button1" />
<label class="hnui-radio-label" for="radio_button1">选项一</label>
<input class="hnui-radio-input" type="radio" name="fieldName2" value="2" id="radio_button2" checked />
<label class="hnui-radio-label" for="radio_button2">选项二</label>
<input class="hnui-radio-input" type="radio" name="fieldName2" value="3" id="radio_button3" />
<label class="hnui-radio-label" for="radio_button3">选项三</label>
<input class="hnui-radio-input" type="radio" name="fieldName2" value="4" id="radio_button4" />
<label class="hnui-radio-label" for="radio_button4">选项四</label>
</div>html
<div class="hnui-radio-group hnui-radio-outline">
<input class="hnui-radio-input" type="radio" name="fieldName3" value="1" id="radio_outline1" />
<label class="hnui-radio-label" for="radio_outline1">选项一</label>
<input class="hnui-radio-input" type="radio" name="fieldName3" value="2" id="radio_outline2" checked />
<label class="hnui-radio-label" for="radio_outline2">选项二</label>
<input class="hnui-radio-input" type="radio" name="fieldName3" value="3" id="radio_outline3" />
<label class="hnui-radio-label" for="radio_outline3">选项三</label>
<input class="hnui-radio-input" type="radio" name="fieldName3" value="4" id="radio_outline4" />
<label class="hnui-radio-label" for="radio_outline4">选项四</label>
</div>html
<div class="hnui-radio-group hnui-radio-filled">
<input class="hnui-radio-input" type="radio" name="fieldName4" value="1" id="radio_filled1" />
<label class="hnui-radio-label" for="radio_filled1">选项一</label>
<input class="hnui-radio-input" type="radio" name="fieldName4" value="2" id="radio_filled2" checked />
<label class="hnui-radio-label" for="radio_filled2">选项二</label>
<input class="hnui-radio-input" type="radio" name="fieldName4" value="3" id="radio_filled3" />
<label class="hnui-radio-label" for="radio_filled3">选项三</label>
<input class="hnui-radio-input" type="radio" name="fieldName4" value="4" id="radio_filled4" />
<label class="hnui-radio-label" for="radio_filled4">选项四</label>
</div>单选状态
Base
Button
Outline
Filled
Disabled
html
<div class="hnui-radio">
<input class="hnui-radio-input" type="radio" name="fieldNameStatusBase" id="radioStatus1" value="1" />
<label class="hnui-radio-label" for="radioStatus1">未选择</label>
</div>
<div class="hnui-radio hover">
<!-- input type="radio" 放在 label标签内 -->
<label class="hnui-radio-label hover">
<input type="radio" class="hnui-radio-input" name="fieldNameStatusBase" value="2" />
悬停
</label>
</div>
<div class="hnui-radio">
<label class="hnui-radio-label">
<input type="radio" class="hnui-radio-input" name="fieldNameStatusBase" value="2" checked />
选中
</label>
</div>
<div class="hnui-radio">
<input class="hnui-radio-input" type="radio" name="fieldNameDisabled" id="fieldNameDisabled1" disabled value="1" />
<label class="hnui-radio-label" for="fieldNameDisabled1">未选禁用</label>
</div>
<div class="hnui-radio disabled">
<label class="hnui-radio-label">
<input type="radio" class="hnui-radio-input" name="fieldNameDisabled" disabled checked value="2" />
选中禁用
</label>
</div>html
<div class="hnui-radio-group">
<input class="hnui-radio-input" type="radio" name="fieldNameStatusButton" value="1" id="radioStatus_button1" />
<label class="hnui-radio-label" for="radioStatus_button1">未选择</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusButton" value="2" id="radioStatus_button2" />
<label class="hnui-radio-label hover" for="radioStatus_button2">悬停</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusButton" checked value="3" id="radioStatus_button3" />
<label class="hnui-radio-label" for="radioStatus_button3">选中</label>
<input class="hnui-radio-input" type="radio" name="fieldNameDisabled2" disabled value="4" id="radioStatus_button4" />
<label class="hnui-radio-label" for="radioStatus_button4">未选禁用</label>
<input class="hnui-radio-input" type="radio" name="fieldNameDisabled2" disabled checked value="5" id="radioStatus_button5" />
<label class="hnui-radio-label" for="radioStatus_button5">选中禁用</label>
</div>html
<div class="hnui-radio-group hnui-radio-outline">
<input class="hnui-radio-input" type="radio" name="fieldNameStatusOutline" value="1" id="radioStatus_outline1" />
<label class="hnui-radio-label" for="radioStatus_outline1">未选择</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusOutline" value="2" id="radioStatus_outline2" />
<label class="hnui-radio-label hover" for="radioStatus_outline2">悬停</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusOutline" checked value="3" id="radioStatus_outline3" />
<label class="hnui-radio-label" for="radioStatus_outline3">选中</label>
<input class="hnui-radio-input" type="radio" name="fieldNameOutlineDisabled3" disabled value="4" id="radioStatus_outline4" />
<label class="hnui-radio-label" for="radioStatus_outline4">未选禁用</label>
<input class="hnui-radio-input" type="radio" name="fieldNameOutlineDisabled3" disabled checked value="4" id="radioStatus_outline5" />
<label class="hnui-radio-label" for="radioStatus_outline5">选中禁用</label>
</div>html
<div class="hnui-radio-group hnui-radio-filled">
<input class="hnui-radio-input" type="radio" name="fieldNameStatusFilled" value="1" id="radioStatus_filled1" />
<label class="hnui-radio-label" for="radioStatus_filled1">未选择</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusFilled" value="2" id="radioStatus_filled2" />
<label class="hnui-radio-label hover" for="radioStatus_filled2">悬停</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameStatusFilled" value="3" id="radioStatus_filled3" />
<label class="hnui-radio-label" for="radioStatus_filled3">选中</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusFilled" value="4" id="radioStatus_filled4" />
<label class="hnui-radio-label" for="radioStatus_filled4">未选禁用</label>
<input class="hnui-radio-input" type="radio" name="fieldNameDisabled3" disabled checked value="4" id="radioStatus_outline5" />
<label class="hnui-radio-label" for="radioStatus_outline5">选中禁用</label>
</div>html
<div class="hnui-radio-group disabled">
<input class="hnui-radio-input" type="radio" name="fieldNameStatusDisabled" value="1" id="radioStatus_button1" />
<label class="hnui-radio-label" for="radioStatus_button1">未选择</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusDisabled" value="2" id="radioStatus_button2" />
<label class="hnui-radio-label hover" for="radioStatus_button2">悬停</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusDisabled" checked value="3" id="radioStatus_button3" />
<label class="hnui-radio-label" for="radioStatus_button3">选中</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusDisabled2" value="4" id="radioStatus_button4" />
<label class="hnui-radio-label" for="radioStatus_button4">未选禁用</label>
<input class="hnui-radio-input" type="radio" name="fieldNameStatusDisabled2" checked value="5" id="radioStatus_button5" />
<label class="hnui-radio-label hnui-radio-outline" for="radioStatus_button5">选中禁用</label>
</div>单选尺寸
Small
Default
Large
Filled
html
<div class="hnui-radio hnui-radio-sm">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeBaseSmall" id="radioSize_small1" value="1" />
<label class="hnui-radio-label" for="radioSize_small1">选项一</label>
</div>
<div class="hnui-radio hnui-radio-sm">
<!-- input type="radio" 放在 label标签内 -->
<label class="hnui-radio-label">
<input type="radio" class="hnui-radio-input" checked name="fieldNameSizeBaseSmall" value="2" />
选项二
</label>
</div>
</div>
<div class="hnui-radio-group hnui-radio-sm">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeButtonSmall" value="1" id="radioSize_button_small1" />
<label class="hnui-radio-label" for="radioSize_button_small1">选项一</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameSizeButtonSmall" value="2" id="radioSize_button_small2" />
<label class="hnui-radio-label" for="radioSize_button_small2">选项二</label>
</div>
<div class="hnui-radio-group hnui-radio-outline hnui-radio-sm">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeOutlineSmall" value="1" id="radioSize_outline_small1" />
<label class="hnui-radio-label" for="radioSize_outline_small1">选项一</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameSizeOutlineSmall" value="2" id="radioSize_outline_small2" />
<label class="hnui-radio-label" for="radioSize_outline_small2">选项二</label>
</div>html
<div class="hnui-radio">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeBaseDefault" id="radioSize2" value="1" />
<label class="hnui-radio-label" for="radioSize2">选项一</label>
</div>
<div class="hnui-radio">
<!-- input type="radio" 放在 label标签内 -->
<label class="hnui-radio-label">
<input type="radio" class="hnui-radio-input" checked name="fieldNameSizeBaseDefault" value="2" />
选项二
</label>
</div>
</div>
<div class="hnui-radio-group">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeButtonDefault" value="1" id="radioSize_button1" />
<label class="hnui-radio-label" for="radioSize_button1">选项一</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameSizeButtonDefault" value="2" id="radioSize_button2" />
<label class="hnui-radio-label" for="radioSize_button2">选项二</label>
</div>
<div class="hnui-radio-group hnui-radio-outline">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeOutline" value="1" id="radioSize_outline1" />
<label class="hnui-radio-label" for="radioSize_outline1">选项一</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameSizeOutline" value="2" id="radioSize_outline2" />
<label class="hnui-radio-label" for="radioSize_outline2">选项二</label>
</div>html
<div class="hnui-radio hnui-radio-lg">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeBaseLarge" id="radioSize_large1" value="1" />
<label class="hnui-radio-label" for="radioSize_large1">选项一</label>
</div>
<div class="hnui-radio hnui-radio-lg">
<!-- input type="radio" 放在 label标签内 -->
<label class="hnui-radio-label">
<input type="radio" class="hnui-radio-input" checked name="fieldNameSizeBaseLarge" value="2" />
选项二
</label>
</div>
</div>
<div class="hnui-radio-group hnui-radio-lg">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeButtonLarge" value="1" id="radioSize_button_large1" />
<label class="hnui-radio-label" for="radioSize_button_large1">选项一</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameSizeButtonLarge" value="2" id="radioSize_button_large2" />
<label class="hnui-radio-label" for="radioSize_button_large2">选项二</label>
</div>
<div class="hnui-radio-group hnui-radio-outline hnui-radio-lg">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeOutlineLarge" value="1" id="radioSize_outline_large1" />
<label class="hnui-radio-label" for="radioSize_outline_large1">选项一</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameSizeOutlineLarge" value="2" id="radioSize_outline_large2" />
<label class="hnui-radio-label" for="radioSize_outline_large2">选项二</label>
</div>html
<div >
<div class="hnui-radio-group hnui-radio-filled hnui-radio-sm">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeFilledSmall" value="1" id="radioSize_button_filled_small1" />
<label class="hnui-radio-label" for="radioSize_button_filled_small1">选项一</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameSizeFilledSmall" value="2" id="radioSize_button_filled_small2" />
<label class="hnui-radio-label" for="radioSize_button_filled_small2">选项二</label>
</div>
</div>
<div >
<div class="hnui-radio-group hnui-radio-filled">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeFilledDefault" value="1" id="radioSize_button_filled1" />
<label class="hnui-radio-label" for="radioSize_button_filled1">选项一</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameSizeFilledDefault" value="2" id="radioSize_button_filled2" />
<label class="hnui-radio-label" for="radioSize_button_filled2">选项二</label>
</div>
</div>
<div >
<div class="hnui-radio-group hnui-radio-filled hnui-radio-lg">
<input class="hnui-radio-input" type="radio" name="fieldNameSizeFilledLarge" value="1" id="radioSize_button_filled_large1" />
<label class="hnui-radio-label" for="radioSize_button_filled_large1">选项一</label>
<input class="hnui-radio-input" type="radio" checked name="fieldNameSizeFilledLarge" value="2" id="radioSize_button_filled_large2" />
<label class="hnui-radio-label" for="radioSize_button_filled_large2">选项二</label>
</div>
</div>