Vue 2 trigger computed with Chinese input problem

I am using vue2 to retrieve my project.

I found that the computed property will only work when entering the key / keyword of Chinese input into the word.

(ex: ㄨㄛˇ => 我It will only run once, not 3 times, when it formats a word)

This is not like a pure javascript event. It is right!?

+4
source share
1 answer

You're right! From the docs ( https://vuejs.org/v2/guide/forms.html ):

, IME (, , ..), , v- IME . , .

:

new Vue({
  el: '#app',
  data: {value: ''}
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.4/vue.js"></script>

<div id="app">
  <p>The value is: {{value}}</p>
  <input v-on:input="value = $event.target.value"/>
</div>
Hide result
+3

Source: https://habr.com/ru/post/1662597/


All Articles