본문 바로가기

Vue/Tutorial

[Vue - tutorial] 배열 변경 감지

리스트를 출력 할 때 배열을 이용한다

 

Vue에서 리스트를 추가, 삭제를 할 때 배열을 변경하여 화면을 갱신할 수 있다.

 

배열을 변경할 때 사용하는 메소드는 다음과 같다

 ** 아래 메소드는 모두 원본 배열의 값을 변경한다.

 

  • push()
  • pop()
  • shift()
  • unshift()
  • splice()
  • sort()
  • resver()

 

push
pop
shift
unshift
splice
reverse
sort

'Vue > Tutorial' 카테고리의 다른 글

[Vue - tutorial] Component  (0) 2019.09.04
[Vue - tutorial] event handling  (0) 2019.09.04
[Vue - tutorial] attribute binding  (0) 2019.09.03
[Vue - tutorial] 리스트 출력하기  (0) 2019.09.03
[Vue - tutorial] Vue devtools  (0) 2019.09.03