Skip to content
On this page

체크 유무를 특정 값으로 바인딩 방법

원인 :

인풋 체크 박스에서 바인딩하면

모델이 true 와 false가 안먹히는 현상이 있다.

해결 방법 :

인풋 에다가 true-value, false-value 추가한다.

html
<input type="checkbox" v-model="AgreeYN" true-value="Y" false-value="N"/>

참고 사이트 :

https://tjddnjs625.tistory.com/34