method
This commit is contained in:
parent
c134f13cec
commit
c147f918bd
4
app.js
4
app.js
@ -4,8 +4,8 @@ var app = new Vue({
|
||||
title: "Hello world."
|
||||
},
|
||||
methods: {
|
||||
changeTitle(event){
|
||||
this.title = event.target.value
|
||||
sayHello(){
|
||||
return "Hello";
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -7,11 +7,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id='app'>
|
||||
<input type="text" v-on:input="changeTitle">
|
||||
<p>{{ title }}</p>
|
||||
<p>{{ sayHello() }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="app.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user