Skip to content

Commit 7ab0b4d

Browse files
committed
[docs][zh] translated functional.md
1 parent db78dbe commit 7ab0b4d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/zh/guide/functional.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Functional Components
1+
# 函数式组件
22

3-
Functional components defined as a Single-File Component in a `*.vue` file also receives proper template compilation, Scoped CSS and hot-reloading support.
3+
在一个 `*.vue` 文件中以单文件形式定义的函数式组件,现在在模板编译、有作用域的 CSS 和热重载也有了良好的支持。
44

5-
To denote a template that should be compiled as a functional component, add the `functional` attribute to the template block. This also allows omitting the `functional` option in the `<script>` block.
5+
要声明一个应该编译为函数式组件的模板,请将 `functional` 特性添加到模板块中。这样做以后就可以省略 `<script>` 块中的 `functional` 选项。
66

7-
Expressions in the template are evaluated in the [functional render context](https://vuejs.org/v2/guide/render-function.html#Functional-Components). This means props need to be accessed as `props.xxx` in the template:
7+
模板中的表达式会在[函数式渲染上下文](https://cn.vuejs.org/v2/guide/render-function.html#函数式组件)中求值。这意味着在模板中,prop 需要以 `props.xxx` 的形式访问:
88

99
``` vue
1010
<template functional>
1111
<div>{{ props.foo }}</div>
1212
</template>
1313
```
1414

15-
If you need to access properties defined globally on `Vue.prototype`, you can access them on `parent`:
15+
你可以在 `parent` 上访问 `Vue.prototype` 全局定义的属性:
1616

1717
``` vue
1818
<template functional>

0 commit comments

Comments
 (0)