We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5feea7d commit ef25562Copy full SHA for ef25562
index.html
@@ -9,16 +9,16 @@
9
</head>
10
<body>
11
<div id="app">
12
- <button @click="changeMessage">Clcik</button>
13
- {{ reversedMessage }}
14
15
+ {{ message }}<br>
+ <button @click="changeMessage">Click</button><br>
+ {{ updated }}
16
</div>
17
<script>
18
new Vue({
19
el: '#app',
20
data: {
21
- message: '헬로우'
+ message: '헬로우',
+ updated: '아니요'
22
},
23
methods: {
24
changeMessage() {
@@ -29,6 +29,12 @@
29
reversedMessage() {
30
return this.message.split('').reverse().join('')
31
}
32
+ },
33
+ watch: {
34
+ message(newVal, oldVal) {
35
+ console.log(newVal, oldVal);
36
+ this.updated = '네';
37
+ }
38
39
})
40
</script>
0 commit comments