Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Commit 17da7ea

Browse files
committed
s4
1 parent 751e695 commit 17da7ea

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "A Vue.js project",
55
"main": "src/main.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"dev": "webpack-dev-server --inline --hot"
89
},
910
"repository": {
1011
"type": "git",
@@ -31,7 +32,8 @@
3132
"css-loader": "^0.23.0",
3233
"style-loader": "^0.13.0",
3334
"vue-loader": "^7.3.0",
34-
"vue-html-loader": "^1.0.0"
35+
"vue-html-loader": "^1.0.0",
36+
"vue-hot-reload-api": "^1.2.0"
3537
},
3638
"dependencies": {
3739
"vue": "^1.0.26"

src/app.vue

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
<template>
2-
<div class="message">{{ msg }}</div>
2+
<div class="message">Value is: {{ count }}</div>
3+
<a href="#" @click.prevent="increment">Increment</a>
34
</template>
45

56
<script>
67
export default {
7-
data () {
8-
return {
9-
msg: 'Hello from vue-loader!'
10-
}
11-
}
8+
data () {
9+
return {
10+
count: 0
11+
}
12+
},
13+
methods: {
14+
increment () {
15+
this.count ++;
16+
}
17+
}
1218
}
1319
</script>
1420

1521
<style>
16-
.message {
17-
color: blue;
18-
}
1922
</style>

0 commit comments

Comments
 (0)