Vue.js + Element UI: Get "event.target" at change
You can use @input.native
var Main = { methods: { change(event) { console.log("The value is: " + event.target.value); //HERE I can't get "event.target" } }};var Ctor = Vue.extend(Main)new Ctor().$mount('#app')
<script src="//unpkg.com/vue/dist/vue.js"></script><script src="//unpkg.com/element-ui@1.4.0-beta.1/lib/index.js"></script><div id="app"> <template> <el-input @input.native="change" placeholder="Input something here"/> </template></div>
It looks like Element UI just eats the event and returns only the value. What you could do instead of @change(change)
is @keyup.native(change)
and then your par
parameter will be the event rather than just the value.