ran into a problem
If the component code is table.vue, which displays an array of source objects in a table
<template> <div> <table border="1"> <tr v-for="(tr,i) in source" :key="i"> <td v-for="(td, ii) in tr" :key="ii">{{ td }}</td> </tr> </table> </div> </template> <script> export default { data() { return { source: [ { q: 'qwe', a: 'asd', b: 'asd' }, { q: 'qwe', a: 'asd', b: 'asd' }, { q: 'qwe', a: 'asd', b: 'asd' } ] }; }, methods:{ test(){ console.log(1) } } </script> How to dynamically add an @click event only to those columns that correspond to the "a" property of each object in the source array. Those. so that in the resulting table, in this example, you can click on each cell in the second column and run the test () method