Vue pass two parameters to @click event

December 9, 2020

You can pass multiple parameters to the function with the event parameter

 <tr v-bind:key="index" v-for="(job, index) in data_rows">
         <router-link :to="{path:'/jobs/''/view',query:query_param}">
         <div v-if="job.invoice==null">
             <a href="javascript:void(0)" @click="function (e) {generate_invoice(e, job);}" :id="" >
                 Generate Invoice

          <div v-else>

You can see the function generate_invoice has got two parameters

@click="function (e) {generate_invoice(e, job);}"
  methods: {

            generate_invoice: function (event,job) {
                let payload = {