转自:https://stackoverflow.com/questions/35835214/vue-js-failed-to-resolve-filter-key
I am following this tutorial and got stuck on the following error
[Vue warn]: Invalid expression. Generated function body: scope.keyup:scope.search[Vue warn]: Failed to resolve filter: key
shown in console.
This is the code.
@{ { movie.name }}
@{ { movie.rating }}
Am I missing something? or is the tutorial outdated?
1 Answer
1
v-on="keyup: search | key 'enter'"
is a old version declaration, change to this:
v-on:keyup.enter="search"