Skip to content

Commit cecad1a

Browse files
authored
Merge pull request #4 from vuefe/2.0-cn
update
2 parents 2df1be3 + 34b95ef commit cecad1a

32 files changed

+2690
-2431
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,20 @@
7979

8080
### Guide
8181
翻译已完成 <br />
82-
新增更新 待翻译 https://github.com/vuefe/vuejs.org/issues/190
8382

8483
### API
85-
翻译已完成
84+
翻译已完成 <br />
8685

8786
### Examples
88-
翻译已完成
87+
翻译已完成 <br />
8988

9089
### Vuex 2.0
91-
翻译中 https://github.com/vuefe/vuejs.org/issues/124
90+
翻译已完成 <br />
91+
校对中 <br />
92+
93+
### webpack2
94+
翻译中 [webpack.js.org](https://github.com/vuefe/webpack.js.org) <br />
95+
9296

9397

9498

src/_posts/why-no-template-url.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ First, it allows us to write our template in a separate HTML file. This gives us
1313

1414
Second, because `templateURL` loads the template via Ajax at runtime, you don't need a build step in order to split up your files. This is convenient during development, but comes at a serious cost when you want to deploy it to production. Before HTTP/2 is universally supported, the number of HTTP requests is still probably the most critical factor in your app's initial load performance. Now imagine you use `templateURL` for every component in your app - the browser needs to perform dozens of HTTP requests before even being able to display anything! In case you don't know, most browsers limit the number of parallel requests it can perform to a single server. When you exceed that limit, your app's initial rendering will suffer for every extra round trip the browser has to wait for. Sure, there are build tools that can help you pre-register all those templates in `$templateCache` - but that shows us a build step is, in fact, inevitable for any serious frontend development.
1515

16-
So, without `templateURL`, how do we deal with the development experience problem? Writing templates as inline JavaScript strings is terrible, faking templates with `<script type="x/template">` also feels like a hack. Well, maybe it's time to up the game a bit and use a proper module bundler like [Webpack](http://webpack.github.io/) or [Browserify](http://browserify.org/). It might seem daunting if you've never dealt with them before, but trust me it's worth it to take the leap. Proper modularization is a necessity if you want to build anything large and maintainable. More importantly, you get to write your [Vue components in a single file](http://vuejs.org/guide/application.html#Single-File-Components), with proper syntax highlighting and the extra benefits of custom pre-processors, hot-reloading, ES2015 by default, autoprefixing and scoped CSS, which makes the development experience 10 times better.
16+
So, without `templateURL`, how do we deal with the development experience problem? Writing templates as inline JavaScript strings is terrible, faking templates with `<script type="x/template">` also feels like a hack. Well, maybe it's time to up the game a bit and use a proper module bundler like [Webpack](http://webpack.github.io/) or [Browserify](http://browserify.org/). It might seem daunting if you've never dealt with them before, but trust me it's worth it to take the leap. Proper modularization is a necessity if you want to build anything large and maintainable. More importantly, you get to write your [Vue components in a single file](http://vuejs.org/guide/single-file-components.html), with proper syntax highlighting and the extra benefits of custom pre-processors, hot-reloading, ES2015 by default, autoprefixing and scoped CSS, which makes the development experience 10 times better.
1717

1818
Finally, Vue does allow you to [lazy load your components](http://vuejs.org/guide/components.html#Async-Components), and with Webpack it is trivially easy. Although this is only a concern when your initial bundle is so large that you are better off splitting it apart.
1919

src/about/index.md

Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8,80 +8,83 @@ order: 0
88

99
- [vue 2.0 - Guide 翻译校对 (进度 / 认领)](https://github.com/vuefe/vuejs.org/issues/77)
1010
- [vuex 2.0 - 文档翻译 (进度 / 认领)](https://github.com/vuefe/vuejs.org/issues/124)
11+
- [webpack2 中文文档翻译(进度 / 认领)](https://github.com/vuefe/webpack.js.org/issues/2)
12+
13+
1114

1215
## Guide 翻译贡献
1316

1417
### Essentials 基础
1518

16-
序号 | 对应文档文件名 | 中文标题 | 翻译贡献者 | 校对贡献者
17-
----- | ------------- | --- | --- | --- | ---
18-
1 | installation.md | 安装 | [dingyiming](https://github.com/dingyiming) |
19-
2 | index.md | 介绍 | [hijiangtao](https://github.com/hijiangtao) |
20-
3 | instance.md | 实例 | [dingyiming](https://github.com/dingyiming) |
21-
4 | syntax.md | 模板语法 | [daix6](https://github.com/daix6) |
22-
5 | computed.md | 计算属 性 | [dingyiming](https://github.com/dingyiming) |
23-
6 | class-and-style.md | Class 与 Style 绑定 | [595074187](https://github.com/595074187) |
24-
7 | conditional.md | 条件渲染 | [dingyiming](https://github.com/dingyiming) |
25-
8 | list.md | 列表渲染 | [tingtien](https://github.com/tingtien) |
26-
9 | events.md | 事件处理器 | [dingyiming](https://github.com/dingyiming) |
27-
10 | forms.md | 表单控件绑定 | [dingyiming](https://github.com/dingyiming) |
28-
11 | components.md | 组件 | [ezreally](https://github.com/ezreally) |
19+
序号 | 对应文档文件名 | 中文标题 | 翻译贡献者 | 校对主要贡献者
20+
----- | ------------- | --- | --- | --- | --- | ---
21+
1 | installation.md | 安装 | [dingyiming](https://github.com/dingyiming) | [ATLgo](https://github.com/ATLgo) [70data](https://github.com/70data)
22+
2 | index.md | 介绍 | [hijiangtao](https://github.com/hijiangtao) | [70data](https://github.com/70data) [ATLgo](https://github.com/ATLgo)
23+
3 | instance.md | 实例 | [dingyiming](https://github.com/dingyiming) | [70data](https://github.com/70data) [ATLgo](https://github.com/ATLgo)
24+
4 | syntax.md | 模板语法 | [daix6](https://github.com/daix6) | [70data](https://github.com/70data)
25+
5 | computed.md | 计算属 性 | [dingyiming](https://github.com/dingyiming) [70data](https://github.com/70data) | [70data](https://github.com/70data)
26+
6 | class-and-style.md | Class 与 Style 绑定 | [595074187](https://github.com/595074187) | [70data](https://github.com/70data)
27+
7 | conditional.md | 条件渲染 | [dingyiming](https://github.com/dingyiming) | [hgcoder](https://github.com/hgcoder)
28+
8 | list.md | 列表渲染 | [tingtien](https://github.com/tingtien) | [hgcoder](https://github.com/hgcoder)
29+
9 | events.md | 事件处理器 | [dingyiming](https://github.com/dingyiming) | [yangzj1992](https://github.com/yangzj1992)
30+
10 | forms.md | 表单控件绑定 | [dingyiming](https://github.com/dingyiming) | [yangzj1992](https://github.com/yangzj1992)
31+
11 | components.md | 组件 | [ezreally](https://github.com/ezreally) | [cuiyongjian](https://github.com/cuiyongjian)
2932

3033
### Advanced 进阶
3134

32-
序号 | 对应文档文件名 | 中文标题 | 翻译贡献者 | 校对贡献者
33-
----- | ------------- | --- | --- | ---
34-
12 | transitions.md | 过渡: 进入, 离开, 和 列表 | [awe](https://github.com/hilongjw) |
35-
13 | transitioning-state.md | 过渡状态 | [awe](https://github.com/hilongjw) |
36-
14 | render-function.md | Render 函数 | [awe](https://github.com/hilongjw) |
37-
15 | reactivity.md | 深入响应式原理 | [veaba](https://github.com/veaba) |
38-
16 | custom-directive.md | 自定义指令 | [harrytospring](https://github.com/harrytospring) |
39-
17 | mixins.md | 混合 | [harrytospring](https://github.com/harrytospring) |
40-
18 | plugins.md | 插件 | [hgcoder](https://github.com/hgcoder) |
41-
19 | single-file-components.md | 单文件组件 | [ATLgo](https://github.com/ATLgo) |
42-
20 | routing.md | 路由 | [dingyiming](https://github.com/dingyiming) |
43-
21 | state-management.md | 状态管理 | [dear-lizhihua](https://github.com/dear-lizhihua) |
44-
22 | unit-testing.md | 单元测试 | [70data](https://github.com/70data) |
45-
23 | ssr.md | 服务端渲染 | [dingyiming](https://github.com/dingyiming) |  
35+
序号 | 对应文档文件名 | 中文标题 | 翻译贡献者 | 校对主要贡献者
36+
----- | ------------- | --- | --- | --- | ---
37+
12 | transitions.md | 过渡: 进入, 离开, 和 列表 | [awe](https://github.com/hilongjw) | [bhnddowinf](https://github.com/bhnddowinf) [StoneQI](https://github.com/StoneQI)
38+
13 | transitioning-state.md | 过渡状态 | [awe](https://github.com/hilongjw) | [bhnddowinf](https://github.com/bhnddowinf)
39+
14 | render-function.md | Render 函数 | [awe](https://github.com/hilongjw) | [bhnddowinf](https://github.com/bhnddowinf)
40+
15 | reactivity.md | 深入响应式原理 | [veaba](https://github.com/veaba) | [yangzj1992](https://github.com/yangzj1992)
41+
16 | custom-directive.md | 自定义指令 | [harrytospring](https://github.com/harrytospring) | [yangzj1992](https://github.com/yangzj1992)
42+
17 | mixins.md | 混合 | [harrytospring](https://github.com/harrytospring) | [bhnddowinf](https://github.com/bhnddowinf)
43+
18 | plugins.md | 插件 | [hgcoder](https://github.com/hgcoder) | [hgcoder](https://github.com/hgcoder)
44+
19 | single-file-components.md | 单文件组件 | [ATLgo](https://github.com/ATLgo) | [zhouzihanntu](https://github.com/zhouzihanntu)
45+
20 | routing.md | 路由 | [dingyiming](https://github.com/dingyiming) | [mlyknown](https://github.com/mlyknown)
46+
21 | state-management.md | 状态管理 | [dear-lizhihua](https://github.com/dear-lizhihua) | [mlyknown](https://github.com/mlyknown)
47+
22 | unit-testing.md | 单元测试 | [70data](https://github.com/70data) | [mlyknown](https://github.com/mlyknown)
48+
23 | ssr.md | 服务端渲染 | [dingyiming](https://github.com/dingyiming) | [yongbolv](https://github.com/yongbolv)
4649

4750
### Migration 迁移
4851

49-
序号 | 对应文档文件名 | 中文标题 | 翻译贡献者 | 校对贡献者
50-
----- | ------------- | --- | --- | ---
51-
24 | migration.md | 1.x迁移 | [harrytospring](https://github.com/harrytospring) |
52-
27 | migration-vue-router.md | vue-router 0.7.x 迁移 | [forzajuve10](https://github.com/forzajuve10) |
52+
序号 | 对应文档文件名 | 中文标题 | 翻译贡献者 | 校对主要贡献者
53+
----- | ------------- | --- | --- | --- | ---
54+
24 | migration.md | 1.x迁移 | [harrytospring](https://github.com/harrytospring) | [yongbolv](https://github.com/yongbolv)
55+
27 | migration-vue-router.md | vue-router 0.7.x 迁移 | [forzajuve10](https://github.com/forzajuve10) | [yizhixiaolongxia](https://github.com/yizhixiaolongxia)
5356

5457
### Meta 更多
5558

56-
序号 | | 对应文档文件名 | 中文标题 | 翻译贡献者 | 校对贡献者
59+
序号 | 对应文档文件名 | 中文标题 | 翻译贡献者 | 校对主要贡献者
5760
----- | ------------- | --- | --- | --- | ---
58-
25 | comparison.md | 对比其他框架 | [yongbolv](https://github.com/yongbolv) |
59-
26 | join.md | 加入Vue.js社区 | [daix6](https://github.com/daix6) |
61+
25 | comparison.md | 对比其他框架 | [yongbolv](https://github.com/yongbolv) | [yangzj1992](https://github.com/yangzj1992)
62+
26 | join.md | 加入 Vue.js 社区 | [daix6](https://github.com/daix6) | [zhouzihanntu](https://github.com/zhouzihanntu)
6063

6164
## API翻译贡献
6265

63-
序号 | 对应小节名称 | 中文标题 | 翻译贡献者 | 校对贡献者
64-
----- | ------------- | --- | --- | ---
65-
1 | Global Config | 全局配置 | [dear-lizhihua](https://github.com/dear-lizhihua) |
66-
2 | Global API | 全局API | [dear-lizhihua](https://github.com/dear-lizhihua) |
67-
3 | Options / Data | 选项 / 数据 | [dear-lizhihua](https://github.com/dear-lizhihua) |
68-
4 | Options / DOM | 选项 / DOM | [ATLgo](https://github.com/ATLgo) |
69-
5 | Options / Lifecycle Hooks | 选项 / 生命周期钩子 | [ATLgo](https://github.com/ATLgo) |
70-
6 | Options / Assets | 选项 / 资源 | [dingyiming](https://github.com/dingyiming) |
71-
7 | Options / Misc | 选项 / 杂项 | [dingyiming](https://github.com/dingyiming) |
72-
8 | Instance Properties | 实例属性 | [coolzjy](https://github.com/coolzjy) |
73-
9 | Instance Methods / Data | 实例方法 / 数据 | [dingyiming](https://github.com/dingyiming) |
74-
10 | Instance Methods / Events | 实例方法 / 事件 | [mlyknown](https://github.com/mlyknown) |
75-
11 | Instance Methods / Lifecycle | 实例方法 / 生命周期 | [mlyknown](https://github.com/mlyknown) |
76-
12 | Directives | 指令| [dingyiming](https://github.com/dingyiming) |
77-
13 | Special Attributes | 特殊元素 | [70data](https://github.com/70data) |
78-
14 | Built-In Components | 内置的组件 | [dear-lizhihua](https://github.com/dear-lizhihua) |
79-
15 | VNode Interface | VNode接口 | [70data](https://github.com/70data) |
80-
16 | Server-Side Rendering | 服务端渲染| [70data](https://github.com/70data)|
66+
序号 | 对应小节名称 | 中文标题 | 翻译贡献者 | 校对主要贡献者
67+
----- | ------------- | --- | --- | --- | --- | ---
68+
1 | Global Config | 全局配置 | [dear-lizhihua](https://github.com/dear-lizhihua) | [bhnddowinf](https://github.com/bhnddowinf)
69+
2 | Global API | 全局 API | [dear-lizhihua](https://github.com/dear-lizhihua) | [bhnddowinf](https://github.com/bhnddowinf)
70+
3 | Options / Data | 选项 / 数据 | [dear-lizhihua](https://github.com/dear-lizhihua) | [bhnddowinf](https://github.com/bhnddowinf)
71+
4 | Options / DOM | 选项 / DOM | [ATLgo](https://github.com/ATLgo) | [bhnddowinf](https://github.com/bhnddowinf)
72+
5 | Options / Lifecycle Hooks | 选项 / 生命周期钩子 | [ATLgo](https://github.com/ATLgo) | [bhnddowinf](https://github.com/bhnddowinf)
73+
6 | Options / Assets | 选项 / 资源 | [dingyiming](https://github.com/dingyiming) | [bhnddowinf](https://github.com/bhnddowinf)
74+
7 | Options / Misc | 选项 / 杂项 | [dingyiming](https://github.com/dingyiming) | [bhnddowinf](https://github.com/bhnddowinf)
75+
8 | Instance Properties | 实例属性 | [coolzjy](https://github.com/coolzjy) | [bhnddowinf](https://github.com/bhnddowinf)
76+
9 | Instance Methods / Data | 实例方法 / 数据 | [dingyiming](https://github.com/dingyiming) | [bhnddowinf](https://github.com/bhnddowinf)
77+
10 | Instance Methods / Events | 实例方法 / 事件 | [mlyknown](https://github.com/mlyknown) | [bhnddowinf](https://github.com/bhnddowinf)
78+
11 | Instance Methods / Lifecycle | 实例方法 / 生命周期 | [mlyknown](https://github.com/mlyknown)| [bhnddowinf](https://github.com/bhnddowinf)
79+
12 | Directives | 指令| [dingyiming](https://github.com/dingyiming) | [bhnddowinf](https://github.com/bhnddowinf)
80+
13 | Special Attributes | 特殊元素 | [70data](https://github.com/70data) | [bhnddowinf](https://github.com/bhnddowinf)
81+
14 | Built-In Components | 内置的组件 | [dear-lizhihua](https://github.com/dear-lizhihua) | [bhnddowinf](https://github.com/bhnddowinf)
82+
15 | VNode Interface | VNode 接口 | [70data](https://github.com/70data) | [dear-lizhihua](https://github.com/dear-lizhihua)
83+
16 | Server-Side Rendering | 服务端渲染| [70data](https://github.com/70data) | [dear-lizhihua](https://github.com/dear-lizhihua)
8184

8285
## 示例翻译
8386

8487
翻译贡献者 : [lindazhang102](https://github.com/lindazhang102)
8588

8689

87-
## 感谢所有参与翻译的朋友们!
90+
## 感谢所有参与翻译的朋友们!

src/api/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,8 +1340,8 @@ type: api
13401340

13411341
``` html
13421342
<div v-for="(item, index) in items"></div>
1343-
<div v-for="(key, val) in object"></div>
1344-
<div v-for="(key, val, index) in object"></div>
1343+
<div v-for="(val, key) in object"></div>
1344+
<div v-for="(val, key, index) in object"></div>
13451345
```
13461346

13471347
`v-for` 默认行为试着不改变整体,而是替换元素。迫使其重新排序的元素,您需要提供一个 `key` 的特殊属性:

src/guide/components.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ Vue.component('child-component', {
745745

746746
### 具名Slots
747747

748-
`<slot>` 元素可以用一个特殊特性, `name` ,配置如何分发内容。多个 slot 可以有不同的名字。具名 slot 将匹配内容片段中有对应 `slot` 特性的元素。
748+
`<slot>` 元素可以用一个特殊的属性 `name` 来配置如何分发内容。多个 slot 可以有不同的名字。具名 slot 将匹配内容片段中有对应 `slot` 特性的元素。
749749

750750
仍然可以有一个匿名 slot ,它是**默认 slot** ,作为找不到匹配的内容片段的回退插槽。如果没有默认的 slot ,这些找不到匹配的内容片段将被抛弃。
751751

@@ -991,8 +991,10 @@ template: '<div><stack-overflow></stack-overflow></div>'
991991

992992
``` html
993993
<my-component inline-template>
994-
<p>These are compiled as the component's own template.</p>
995-
<p>Not parent's transclusion content.</p>
994+
<div>
995+
<p>These are compiled as the component's own template.</p>
996+
<p>Not parent's transclusion content.</p>
997+
</div>
996998
</my-component>
997999
```
9981000

0 commit comments

Comments
 (0)