8000 Merge pull request #34 from vuejs/lang-zh · likang/vuejs.org@a699698 · GitHub
[go: up one dir, main page]

Skip to content

Commit a699698

Browse files
committed
Merge pull request vuejs#34 from vuejs/lang-zh
fix unit test example code
2 parents 754b050 + d09d37c commit a699698

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

source/guide/application.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,14 @@ app.currentView = 'page1'
6666
``` js
6767
// my-component.js
6868
module.exports = {
69+
template: '<span>{{msg}}</span>',
70+
data: function () {
71+
return {
72+
msg: 'hello!'
73+
}
74+
}
6975
created: function () {
70-
this.message = 'hello!'
76+
console.log('my-component created!')
7177
}
7278
}
7379
```
@@ -108,4 +114,4 @@ describe('my-component', function () {
108114

109115
## 一个示例
110116

111-
[Vue.js Hackernews Clone](https://github.com/yyx990803/vue-hackernews) 是一个应用的例子,它把 Browserify + Vueify 用来代码组织、Director.js 用来做路由、HackerNews 官方的 Firebase API 为后端。这不算什么特别大的应用,但它结合并展示了本页面讨论到的各方面概念。
117+
[Vue.js Hackernews Clone](https://github.com/yyx990803/vue-hackernews) 是一个应用的例子,它把 Webpack + vue-loader 用来代码组织、Director.js 用来做路由、HackerNews 官方的 Firebase API 为后端。这不算什么特别大的应用,但它结合并展示了本页面讨论到的各方面概念。

0 commit comments

Comments
 (0)
0