quantumcode

  • 홈
  • 태그
  • 방명록

$watch 1

라우터 이동 시 데이터 가져오기

1. component 랜더링 완료 후 라우터 이동 시 params 값을 체크하여 데이터를 가져오는 방식으로 아래와 같이 watch를 사용하여 component가 랜더링 완료 후 가져오는 방식이 있습니다. 데이터 로드가 느리거나 로딩 이미지가 필요할 때 사용 created() { // 컴포넌트 생성시 데이터를 패치한다 this.fetchData() }, watch: { '$route': 'fetchData' }, methods: { fetchData () { this.loading = true db.collection('user').where('ep_id', '==', this.$route.params.employee_id).get() .then(querySnapshop => { querySnapshop..

웹프레임워크/vue.js 2022.02.04
이전
1
다음
더보기
프로필사진

quantumcode

  • 분류 전체보기 (69)
    • 그래픽 (3)
    • 웹코딩 (38)
      • javascript (10)
      • jquery (2)
      • html (5)
      • css3 (19)
      • php (2)
    • 웹프레임워크 (11)
      • vue.js (10)
    • 웹정보 (12)
    • python (0)
    • 웹기획 (3)
    • 자료실 (1)

Tag

텍스트 여백 제거, sass:map, :part(), curl데이터 가져오기, javascript, CSS, clipboard copy, Firebase, slickslider, css 여백 제거, beforerouterenter, async, HTML, vue.js, css3, 선택자, firestore, vim, php변수 html로 전달, meta tag attribute,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/08   »
일 월 화 수 목 금 토
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바