Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b8bdc90

Browse files
Merge pull request vuejs#150 from iHelin/patch-1
partials部分翻译补充.md
2 parents d7d0089 + 4b76547 commit b8bdc90

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/v2/guide/migration.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,11 +1530,12 @@ el 选项不再在 `Vue.extend`中使用。仅在实例创建参数中可用。
15301530

15311531
### `Vue.partial` <sup>移除</sup>
15321532

1533-
Partials have been removed in favor of more explicit data flow between components, using props. Unless you're using a partial in a performance-critical area, the recommendation is to simply use a [normal component](components.html) instead. If you were dynamically binding the `name` of a partial, you can use a [dynamic component](components.html#Dynamic-Components).
1533+
Partials 已被移除,取而代之的是更明确的组件之间的数据流--props。除非你正在使用一个部分性能关键型区域,否则建议只使用一个[normal component](components.html)来代替。如果你是动态绑定部分的`name`,您可以使用[dynamic component](components.html#Dynamic-Components)
15341534

1535-
If you happen to be using partials in a performance-critical part of your app, then you should upgrade to [functional components](render-function.html#Functional-Components). They must be in a plain JS/JSX file (rather than in a `.vue` file) and are stateless and instanceless, just like partials. This makes rendering extremely fast.
15361535

1537-
A benefit of functional components over partials is that they can be much more dynamic, because they grant you access to the full power of JavaScript. There is a cost to this power however. If you've never used a component framework with render functions before, they may take a bit longer to learn.
1536+
如果你碰巧在你的应用程序的性能关键部分使用`partials`,那么你应该升级到[functional components](render-function.html#Functional-Components)。它们必须在纯JS / JSX文件中(而不是在`.vue`文件中),并且是无状态的和无实例的,就像`partials`。这使得渲染极快。
1537+
1538+
`functional components`相对于`partials`一个好处是它们可以更具动态性,因为它们允许您访问JavaScript的全部功能。然而,这是有成本的。如果你从来没有使用过渲染式的组件框架,你可能需要花费更长的时间来学习它们。
15381539

15391540

15401541
{% raw %}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /