内联处理器里的方法
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <div id="app"> <button v-on:click="fun('value11111')">aaa</button> <button v-on:click="fun('value22222')">bbb</button> </div> </body> <script type="text/javascript" src="js/vue.js"></script> <script type="text/javascript"> new Vue({ el:"#app", methods:{ fun:function(a){ alert(a) } } }) </script> </html>