Vue v-for a click event not working - Stack Overflow
伊谢尔伦
伊谢尔伦 2017-07-05 11:02:44
0
1
1306
<template>
<p class="mainPanel page-app">
<p class="jk-box">
<ul>
        <li v-for="x in list"  ><a id="dangwuzhinan" @click.native="change">{{x.name}}</a></li>
</ul>
</p>
</p>
</template>
<script>
export default {
  name:"app",
  data () {
      return {
         list:[
            {name:"3333333333333"},
            {name:"2222222222"},
            {name:"11111111"}
            ],
          
      }
  },
  methods:{
    change: function() {
    
      console.log("aaa")
    }
  }
}

Please give me some advice...I won’t report an error either

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
黄舟

You can refer to this =》Answer

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template