Vue点击事件

HTML

1 <button @click="showPane">切换显示内容</button>

JS 

使用  methods     方法

methods:{
       showPane:()=>{
        // 写点击后发生的事情
            }
        }

 

posted @ 2022-01-05 19:58  GGFWI  阅读(191)  评论(0)    收藏  举报