forked from Happy-Coding-Clans/vue-easytable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathve-radio.less
126 lines (114 loc) · 3.04 KB
/
ve-radio.less
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
.ve-radio *,
.ve-radio *:before,
.ve-radio *:after {
box-sizing: border-box;
}
.ve-radio {
margin: 0 8px 0 0;
&,
.ve-radio-container {
padding: 0;
color: #000000d9;
font-size: 14px;
line-height: 22px;
list-style: none;
position: relative;
display: inline-block;
white-space: nowrap;
cursor: pointer;
}
// container
.ve-radio-container {
margin: 0;
top: -1px;
line-height: 1;
vertical-align: sub;
outline: none;
// radio input
.ve-radio-input {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
cursor: pointer;
opacity: 0;
}
// radio inner
.ve-radio-inner {
position: relative;
top: 0;
left: 0;
display: block;
width: 16px;
height: 16px;
background-color: #fff;
border: 1px solid #d9d9d9;
border-radius: 100px;
transition: all 0.3s;
&:after {
position: absolute;
top: 3px;
left: 3px;
display: table;
width: 8px;
height: 8px;
background-color: @ve-radio-checked-background-color;
border-top: 0;
border-left: 0;
border-radius: 8px;
transform: scale(0);
opacity: 0;
transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
content: " ";
}
}
// 选中效果
&.ve-radio-checked {
&:after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 1px solid @ve-radio-checked-border-color;
border-radius: 50%;
visibility: hidden;
animation-fill-mode: both;
content: "";
}
.ve-radio-inner {
border-color: @ve-radio-checked-border-color;
}
.ve-radio-inner:after {
transform: scale(1);
opacity: 1;
transition: all 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
}
}
// 禁用效果
&.ve-radio-disabled {
.ve-radio-input {
cursor: not-allowed;
}
.ve-radio-inner {
background-color: #f5f5f5;
border-color: #d9d9d9 !important;
cursor: not-allowed;
&:after {
background-color: #00000033;
}
}
& + span {
color: rgba(0, 0, 0, 0.25);
cursor: not-allowed;
}
}
}
// label
&-label {
padding: 0 4px;
color: @ve-radio-label-text-color;
}
}