vue mounted 썸네일형 리스트형 [Vue] mounted 에서 data undefined 발생할 경우 mounted : function() { let $vm = this this.$nextTick(function() { document.getElementById('btn1').addEventListener('click', function () { console.log(typeof($vm.items)) console.log($vm.items) $vm.items.push('B') }) }); },아니면arrow function 사용 출처 : https://stackoverflow.com/questions/51929737/vuejs-data-property-returns-undefined-in-mounted-function 더보기 이전 1 다음