@click
This commit is contained in:
parent
78e0c132e7
commit
1ac671e702
9
app.js
9
app.js
@ -1,14 +1,11 @@
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
title: "Hello World",
|
||||
link: "https://google.com",
|
||||
finishedLink: '<a href="http://google.com/">Google</a>'
|
||||
counter: 0
|
||||
},
|
||||
methods:{
|
||||
sayHello(){
|
||||
this.title = 'Hello';
|
||||
return this.title;
|
||||
click(){
|
||||
this.counter++;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -7,10 +7,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id='app'>
|
||||
<h1 v-once>{{title}}</h1>
|
||||
<p>{{ sayHello() }}</p> - <a v-bind:href="link">Google</a>
|
||||
|
||||
<p v-html="finishedLink"></p>
|
||||
<button @click="click">Click Me</button>
|
||||
<p>{{ counter }}</p>
|
||||
</div>
|
||||
|
||||
<script src="app.js" charset="utf-8"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user