<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>

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
  • 2022-03-01
  • 2021-11-05
猜你喜欢
  • 2022-12-23
  • 2022-02-21
  • 2022-12-23
  • 2021-08-13
  • 2021-10-27
相关资源
相似解决方案