In Vue.js, how would I write a component that binds to a string of 1s and 0s, such as "111001011", and represents this data to the user as a set of named checkboxes?
Join the Stack Overflow Community
Stack Overflow is a community of 6.6 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up
Join them; it only takes a minute:
|
Maybe this is what you'r looking for: App.vue
Checkboxes.vue:
This will go through the string length and for each character will mark as checked/unchecked based on the binary value(1/0) Result: |
|||||||||
|