본문 바로가기
front/vue

[vue3] checkbox specification

by juniKang 2022. 7. 25.

1. when v-model type is Array or Set

  checked unchecked
true-value X X
false-value X X
value O O
checked X X

2. when v-model type is not Array

  checked unchecked
true-value O X
false-value X O
value X X
checked X X

3. when v-model is undefined or null

  checked unchecked
true-value O X
false-value X O
value X X
checked O X

 

'front > vue' 카테고리의 다른 글

[Vue] defineComponent()  (0) 2022.07.30
[Vue] Custom Directives  (0) 2022.07.29
[eslint] vue3 eslint 설정  (0) 2022.07.23
순수자바스크립트로 뷰의 반응형 구현하기(ref, watchEffect, computed)  (0) 2022.07.12
TS with Composition API  (0) 2022.05.09

댓글