Skip to content
This repository was archived by the owner on Aug 8, 2022. It is now read-only.

Translated single file component #665

Merged
merged 2 commits into from
Aug 20, 2021
Merged

Translated single file component #665

merged 2 commits into from
Aug 20, 2021

Conversation

Yue-plus
Copy link
Contributor

Description of Problem

Proposed Solution

Additional Information

Copy link
Member

@veaba veaba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

粗略 review 了下,后续可根据 #626 使得语法更加凝练,感谢 PR。

@Yue-plus Yue-plus requested a review from veaba August 20, 2021 08:49
@veaba veaba merged commit 106cd9b into vuejs:master Aug 20, 2021
Copy link

@zhanglolo zhanglolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

提出一点修改意见


## 工作原理

Vue SFC 是特定于框架的文件格式,必须由 [@vue/compiler-sfc](https://github.com/vuejs/vue-next/tree/master/packages/compiler-sfc) 预编译为标准的 JavaScript 与 CSS。编译后的 SFC 是一个标准的 JavaScript(ES)模块——这意味着通过正确的构建设置,可以像模块一样导入 SFC:
Vue SFC 是框架指定的文件格式,必须由 [@vue/compiler-sfc](https://github.com/vuejs/vue-next/tree/master/packages/compiler-sfc) 预编译为标准的 JavaScript 与 CSS。编译后的 SFC 是一个标准的 JavaScript(ES)模块——这意味着通过正确的构建配置,可以像模块一样导入 SFC:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这意味着通过正确的构建配置,可以像模块一样导入 SFC:

译为:

这意味着通过正确的构建配置,可以将 SFC 像模块一样导入 :

比较符合下面演示的例子

@@ -79,7 +79,7 @@ SFC 是 Vue 作为框架的定义特性,也是在以下场景中使用 Vue 的

一些来自传统 Web 开发背景的用户可能会担心 SFC 在同一个地方混合了不同的关注点——HTML/CSS/JS 应该分开!

要回答这个问题,我们必须同意关注点分离不等于文件类型分离。工程原理的最终目标是提高代码库的可维护性。关注点分离,当教条地应用为文件类型的分离时,并不能帮助我们在日益复杂的前端应用程序的上下文中实现该目标。
要回答这个问题,我们必须同意关注点分离不等于文件类型分离。工程原理的最终目标是提高代码库的可维护性。关注点分离,当墨守成规地应用为文件类型的分离时,并不能帮助我们在日益复杂的前端应用程序的上下文中实现该目标。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议译为:

要回答这个问题,我们必须认同关注点分离不等于文件类型分离。工程原理的最终目标是提高代码库的可维护性。当关注点分离,被墨守成规地应用为文件类型的分离时,并不能帮助我们在前端应用程序日益复杂的背景下实现该目标。

@veaba
Copy link
Member

veaba commented Aug 20, 2021

@zhanglolo 可以发起一个 PR 来完善哈

Yue-plus added a commit to Yue-plus/docs-next-zh-cn that referenced this pull request Aug 20, 2021
Translated single file component (vuejs#665)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants