vue 事件参数传$event打印当前组件

<template>
    <div class="hello">
        <button v-on:click.once="getinfo($event)">   我是按钮 </button>
    </div>
</template>

<script>
import urls from "@/api/urls";

export default {
  name: "HelloWorld",
  data() {
    return {};
  },
  methods: {
    getinfo(event) {
      console.log(event);
    },
  }
};
</script>

<style scoped>
</style>

posted @ 2018-11-02 10:47  李美玲  阅读(4244)  评论(0编辑  收藏  举报