optimize Radio size and disabled style
optimize Radio size and disabled style
This commit is contained in:
parent
7098f97287
commit
7d7221ec98
4 changed files with 41 additions and 43 deletions
2
dist/styles/iview.all.css
vendored
2
dist/styles/iview.all.css
vendored
File diff suppressed because one or more lines are too long
2
dist/styles/iview.css
vendored
2
dist/styles/iview.css
vendored
File diff suppressed because one or more lines are too long
|
@ -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,
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue