When using Non Ascii alias for list items in `v-for` directive, event handling is not working as expected.
Vue version
3.2.37
Link to minimal reproduction
Steps to reproduce
Please press the respective button to confirm the content of the alert.
What is expected?
The alert will show the same content as the text on the button.
What is actually happening?
For the one using Non Ascii alias in v-for
, the alert will only display the text of the first button.
System Info
No response
Any additional comments?
It works well in Vue 2.7.8
this is a bug 🐛
the compiler does not detect 果物
as an identifier of the v-for scope
<li v-for="果物 in fluits" :key="果物">
<button @click="onClick(果物)">{{ 果物 }}</button>
</li>
and caches the handler
onClick: _cache[0] || (_cache[0] = $event => (onClick(果物)))
handlers should not be cached when there it depends on v-for scoped variables.