File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <label role =" checkbox"
3
- :class =" className"
4
- :aria-checked =" ariaChecked" >
2
+ <label :class =" className" >
5
3
<input type =" checkbox"
6
4
class =" v-switch-input"
7
5
:name =" name"
@@ -70,7 +68,7 @@ export default {
70
68
type: [String , Object ],
71
69
validator (value ) {
72
70
return typeof value === ' object'
73
- ? (value .checked || value .unchecked )
71
+ ? (value .checked || value .unchecked || value . disabled )
74
72
: typeof value === ' string'
75
73
}
76
74
},
@@ -111,10 +109,6 @@ export default {
111
109
return [' vue-js-switch' , { toggled, disabled }]
112
110
},
113
111
114
- ariaChecked () {
115
- return this .toggled .toString ()
116
- },
117
-
118
112
coreStyle () {
119
113
return {
120
114
width: px (this .width ),
@@ -265,7 +259,10 @@ $margin: 3px;
265
259
cursor : pointer ;
266
260
267
261
.v-switch-input {
268
- display : none ;
262
+ opacity : 0 ;
263
+ position : absolute ;
264
+ width : 1px ;
265
+ height : 1px ;
269
266
}
270
267
271
268
.v-switch-label {
You can’t perform that action at this time.
0 commit comments