-
I would like to say that I'm still quite new to Nuxt, Vue and javascript in general, so I hope to not offend anyone. Inspired by this little switch built-in vitepress While testing a simple ARadial everything worked fine:
But for the ASwitch, maybe since it has only a boolean v-model, nothing worked:
As you can see I would like to read the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I'm realizing only now how much I still need to learn about javascript. While looking at others people code about similar tools I've been able to at least make the switch work with:
But since I'm using Nuxt mainly for smaller boilerplates (and more battery-included) I've managed somehow to shrink it down like this:
Now, I firstly need to figure out a way to give the default position of the switch from colorMode.value and then to prevent colorMode.preference to be set to dark while system is already in dark. |
Beta Was this translation helpful? Give feedback.
-
Ok looks like I was reinventing the wheel.
|
Beta Was this translation helpful? Give feedback.
Ok looks like I was reinventing the wheel.
Vue does provide a built in feature to bind a checkbox to specific string for when it's true or false, but ASwitch (nor ACheckbox) doesn't take advantage of it.