v-on事件处理中函数名有无括号的区别
知乎回答:https://www.zhihu.com/question/55753541
个人理解:
不加括号当解析器,会传入一个默认参数,这个默认参数就是触发时间$event
加了括号当js代码执行
show: function(e) { console.log(e); } // <button type="button" @click="show">CLICK</button> => click事件触发对象 // <button type="button" @click="show()">CLICK</button> => undefinded
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号