Skip to content

Commit eade250

Browse files
committed
Fixed #1
1 parent 291ce25 commit eade250

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/components/ToggleButton.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ export default {
4343
}
4444
},
4545
46+
watch: {
47+
defaultState: function defaultState() {
48+
this.currentState = Boolean(this.defaultState)
49+
}
50+
},
51+
4652
computed: {
53+
// currentState() {
54+
// return this.defaultState;
55+
// },
56+
4757
isActive() {
4858
return this.currentState;
4959
},
@@ -58,7 +68,7 @@ export default {
5868
5969
checkedValue: {
6070
get() {
61-
return this.defaultState;
71+
return this.currentState;
6272
},
6373
6474
set(newValue) {

0 commit comments

Comments
 (0)