Skip to content

v-on call method with multiple parameters #201

Closed
@paglias

Description

@paglias

When using the v-on directive this way:

v-on="click: method(param1, param2)"

It fails to parse the expression. I think because it thinks the comma marks the beginning of a new event-bound method like:

v-on="click: method(param1), event2: method2()"

This is the code, but I'm having problems replicating this in a fiddle:

  <ul>
    <li v-repeat="note: notes | filterBy status.query">
      <a v-on="click: open(notes.indexOf(note), 'a')">{{note.content}}</a>
      <input type="text" v-model="note.content" v-on="input: saveDebounced(note)"><a v-on="click: destroy($index)">x</a>
    </li>
  </ul>

and this is the console output:

selezione_048

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions