<template>
<div>
<h3>form 실습</h3>
<hr />
<input type="checkbox" v-model="chk1" />약관동의
<hr />
<input type="checkbox" value="1" v-model="chk2" />html
<input type="checkbox" value="2" v-model="chk2" />css
<input type="checkbox" value="3" v-model="chk2" />javascript
<input type="checkbox" value="4" v-model="chk2" />vue
</div>
</template>
<script>
export default {
watch: {
chk1: {
handler(e) {
console.log('chk1', e);
}
},
chk2: {
handler(e) {
console.log('chk2', e);
}
}
},
data() {
return {
chk1: true,
chk2: ["1", "3"],
}
}
}
</script>
<style scoped>
</style>