1)
<!DOCTYPE HTML> <html> <head> <metacharset="utf-8"> <metahttp-equiv="X-UA-Compatible"content="IE=edge"> <title></title> <linkrel="stylesheet"href=""> </head> <body> {{title}} newVue({ el:"#app", data: { title:"Hello World!", link:'http://google.com' }, methods: { changeTitle:function(event) { this.title = event.target.value; } } }); </body> </html>
2)
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <link rel="stylesheet" href=""> http://vue.js </head> <body>Click menew Vue({ el: "#app", data: { counter: 0, x:0, y:0, }, methods: { increase: function(step, event) { this.counter += step; }, updateCoordinates: function(event){ this.x=event.clientX; this.y=event.clientY; } }}); </body> </html>{{counter}}
Coordinates: {{x}}/{{y}}