File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 55
55
56
56
data () {
57
57
return {
58
+ m_checked: undefined ,
58
59
default_mode: false ,
59
60
}
60
61
},
85
86
return typeof this .modelValue === ' string' ? true : !! this .modelValue ;
86
87
}
87
88
88
- return typeof this .checked === ' string' ? true : !! this .checked ;
89
+ // this.modelValue === undefined
90
+ if (this .m_checked === undefined )
91
+ return this .m_checked = typeof this .checked === ' string' ? true : !! this .checked ;
92
+ else
93
+ return this .m_checked ;
89
94
},
90
95
_disabled () {
91
96
return typeof this .disabled === ' string' ? true : !! this .disabled ;
161
166
},
162
167
163
168
watch: {
169
+ checked (v ) {
170
+ this .m_checked = v;
171
+ },
164
172
indeterminate (v ) {
165
173
this .$refs .input .indeterminate = v;
166
174
},
182
190
183
191
let isChecked = event .target .checked ;
184
192
193
+ this .m_checked = isChecked;
194
+
185
195
if (this .modelValue instanceof Array ) {
186
196
let newValue = [... this .modelValue ];
187
197
You can’t perform that action at this time.
0 commit comments