Muscardinus

event modifier 본문

카테고리 없음

event modifier

Muscardinus 2021. 12. 28. 02:49
728x90

https://v3.vuejs.org/guide/events.html#event-modifiers

 

Event Handling | Vue.js

Event Handling Learn how to handle events in a free Vue School lesson Listening to Events We can use the v-on directive, which we typically shorten to the @ symbol, to listen to DOM events and run some JavaScript when they're triggered. The usage would be

v3.vuejs.org

해당 글에 볼 수 있듯이, 우리는 불필요한 dom event들을 신경 안쓰고, Logic에 더 집중할 수 있다.

 

<input
        type="text"
        :value="lastName"
        @input.prevent="updateLastName('Last name event triggered', $event)"
      />
728x90
Comments