new Vue({ el: '#root', methods: { say: function (msg) { alert(msg) } } })
<html> <body> <div id="root"> <button type="button" v-on:click="say('Hello')">Say Hello</button> </div> </body> <script src="https://cdn.jsdelivr.net/npm/vue"></script> </html>