screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head> <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> </head> <body> <div id="app"> <h3>Vue checkbox value true false</h3> <div v-for="item in items" :key="item.title"> <label> <input type="checkbox" v-model="item.status"> {{ item.title }} </label> </div> <pre>{{ items }}</pre> </div> <script type="module"> const app = Vue.createApp({ data() { return { items: [ { "title": "Question 1", "status": true }, { "title": "Question 2 ", "status": false } ] }; } }); app.mount('#app'); </script> <style> #app { display: flex; flex-direction: column; align-items: center; font-family: Arial, sans-serif; } h3 { margin-top: 0; } label { display: flex; align-items: center; margin-bottom: 8px; } input[type="checkbox"] { margin-right: 8px; } pre { margin-top: 16px; padding: 8px; background-color: #f5f5f5; border-radius: 4px; } </style> </body> </html>