method
This commit is contained in:
parent
c134f13cec
commit
c147f918bd
6
app.js
6
app.js
@ -3,9 +3,9 @@ var app = new Vue({
|
||||
data: {
|
||||
title: "Hello world."
|
||||
},
|
||||
methods:{
|
||||
changeTitle(event){
|
||||
this.title = event.target.value
|
||||
methods: {
|
||||
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