WEB/Vue.js

    [Vue2] 오류: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated:

    [Vue2] 오류: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated:

    [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "" 다음과 같은 오류가 발생했다. Vue warn이라 그런지 동작하는데 문제는 없지만, 그래도 이런 오류는 해결해주는게 인지상정😉 부모 component가 다시 렌더링되면 값이 overwritten되기 때문에 prop을 직접 변화시키는걸 피하라면서, data나 computed를 사용하라고 한다. Vue2의 공식문서에서 다음과 같이 설명..

    [Vue] input checkbox value 'Y' 'N'으로 설정

    [Vue] input checkbox value 'Y' 'N'으로 설정

    # Vue.js input property 사용하기 checkbox type의 input태그의 기본 값은 true/false이다. DB에서 true/false가 아닌 'Y'/'N'이나 'yes'/'no' 등으로 관리할 경우 input tag property인 true-value와 false-value를 사용한다. v-model을 사용하여 기본 값을 넣어줘야 제대로 들어간다. 주의할 점은 form submit을 할 경우 체크되지 않은 값은 전송되지 않는다. v-model로 바인딩하여 전송한다면 문제없다. 더보기 # 사용 예 ... ... window.app = new Vue({ el: '#app', data: { item: { isSecure: 'N', } }, methods: { writeBoard() ..