Skip to content

Commit 334dda1

Browse files
committed
use modifier for v-on key filter
1 parent a6ecf9d commit 334dda1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/directives/on.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = {
99
bind: function () {
1010
// 1.0.0 key filter
1111
var rawArg = this.arg
12-
var keyIndex = rawArg.indexOf(':')
12+
var keyIndex = rawArg.indexOf('.')
1313
if (keyIndex > -1) {
1414
this.arg = rawArg.slice(0, keyIndex)
1515
this.key = rawArg.slice(keyIndex + 1)

test/unit/specs/directives/on_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ if (_.inBrowser) {
7474
it('with key filter (new syntax)', function (done) {
7575
new Vue({
7676
el: el,
77-
template: '<a @keyup:enter="test">{{a}}</a>',
77+
template: '<a @keyup.enter="test">{{a}}</a>',
7878
data: {a: 1},
7979
methods: {
8080
test: function () {

0 commit comments

Comments
 (0)