목록javascript (3)
개발블로그
@click 클릭되는 이벤트 함수를 발생한다. 1 2 3 4 5 6 7 8 9 10 클릭 new vue({ el: '#app', methods: { handleClick: () => { alert('클릭') } } }) Colored by Color Scripter cs @change 값이 변했을 때 이벤트 함수 발생 1 2 3 4 5 6 7 8 9 10 11 12 13 new Vue ({ el: '#app', data: { message: 'Hello Vue.js' }, methods: { handleInput: () => { this.message = event.target.vlaue // 할당 전에 어떤 처리하기 } } }) Colored by Color Scripter cs
참고 : https://axios-http.com/kr/docs/intro Axios란node.js와 브라우저를 위한 promise 기반 HTTP 클라이언트이다.특징브라우저를 위해 XMLHttpRequests 생성node.js를 위해 http 요청 생성Promise API를 지원요청 및 응답 인터셉트요청 및 응답 데이터 변환요청 취소JSON 데이터 자동 변환XSRF를 막기 위한 클라이언트 사이드 지원
ES6란ECMAScript 6ES6의 새로운 기능const and letArrow functions(화살표 함수)Template Literals(템플릿 리터럴)Default parameters(기본 매개 변수)Array and object destructing(배열 및 객체 비구조화)Import and export(가져오기 및 내보내기)Promises(프로미스)Rest parameter and Spread poerator(나머지 매개 변수 및 확산 연산자)Classes(클래스)ES6 문법const and letconst변수 선언을위한 ES6의 새로운 키워드var보다 강력하다.사용되면 변수를 다시 할당할 수 없다.객체와 함께 사용할 때를 제외하고는 변경 불가능한 변수이다.선택자를 대상으로 하는데 매우 유용..