optimize Radio size and disabled style

optimize Radio size and disabled style
This commit is contained in:
梁灏 2016-11-02 10:21:52 +08:00
parent 7098f97287
commit 7d7221ec98
4 changed files with 41 additions and 43 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -33,8 +33,8 @@
}
&-inner {
display: inline-block;
width: 16px;
height: 16px;
width: 14px;
height: 14px;
position: relative;
top: 0;
left: 0;
@ -45,8 +45,8 @@
&:after {
position: absolute;
width: 10px;
height: 10px;
width: 8px;
height: 8px;
left: 2px;
top: 2px;
border-radius: @border-radius-base;
@ -68,24 +68,34 @@
left: 0;
right: 0;
z-index: 1;
cursor: pointer;
opacity: 0;
cursor: pointer;
}
}
// 选中状态
.@{radio-prefix-cls}-checked {
.@{radio-inner-prefix-cls} {
border-color: @border-color-base;
border-color: @primary-color;
&:after {
opacity: 1;
.transform(scale(1));
.transition(all @transition-time @ease-in-out);
}
}
&:hover {
.@{radio-inner-prefix-cls} {
border-color: @primary-color;
}
}
}
.@{radio-prefix-cls}-disabled {
cursor: @cursor-disabled;
.@{radio-prefix-cls}-input {
cursor: @cursor-disabled;
}
&:hover {
.@{radio-inner-prefix-cls} {
border-color: @border-color-base;
@ -99,13 +109,8 @@
}
}
.@{radio-inner-prefix-cls}-input {
cursor: default;
}
.@{radio-prefix-cls}-disabled + span {
color: #ccc;
cursor: @cursor-disabled;
}
}
@ -203,7 +208,7 @@ span.@{radio-prefix-cls} + * {
&-disabled {
border-color: @border-color-base;
background-color: @background-color-base;
cursor: not-allowed;
cursor: @cursor-disabled;
color: #ccc;
&:first-child,

View file

@ -1,32 +1,25 @@
<template>
<div>
<Collapse active-key="2">
<Panel key="1">
Header1
<Collapse active-key="2" slot="content">
<Panel key="1">
inHeader1
<p slot="content">inContent1</p>
</Panel>
<Panel key="2">
inHeader2
<p slot="content">inContent2</p>
</Panel>
<Panel key="3">
inHeader3
<p slot="content">inContent3</p>
</Panel>
</Collapse>
</Panel>
<Panel key="2">
Header2
<p slot="content">A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
</Panel>
<Panel key="3">
Header3
<p slot="content">A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.</p>
</Panel>
</Collapse>
<Radio-group :model.sync="phone">
<Radio value="apple">
<Icon type="social-apple"></Icon>
<span>Apple</span>
</Radio>
<Radio value="android" disabled>
<Icon type="social-android"></Icon>
<span>Android</span>
</Radio>
<Radio value="windows">
<Icon type="social-windows"></Icon>
<span>Windows</span>
</Radio>
</Radio-group>
<Radio-group :model.sync="animal">
<Radio value="金斑蝶"></Radio>
<Radio value="爪哇犀牛"></Radio>
<Radio value="印度黑羚"></Radio>
</Radio-group>
<br><br>
<Button @click="activeKey = '2'"></Button>
</div>
<Radio :checked.sync="radio">Radio</Radio>