-
Notifications
You must be signed in to change notification settings - Fork 838
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
粗略 review 了下,后续可根据 #626 使得语法更加凝练,感谢 PR。
Co-authored-by: Godpu <[email protected]>
There was a problem hiding this 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: |
There was a problem hiding this comment.
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 应该分开! | |||
|
|||
要回答这个问题,我们必须同意关注点分离不等于文件类型分离。工程原理的最终目标是提高代码库的可维护性。关注点分离,当教条地应用为文件类型的分离时,并不能帮助我们在日益复杂的前端应用程序的上下文中实现该目标。 | |||
要回答这个问题,我们必须同意关注点分离不等于文件类型分离。工程原理的最终目标是提高代码库的可维护性。关注点分离,当墨守成规地应用为文件类型的分离时,并不能帮助我们在日益复杂的前端应用程序的上下文中实现该目标。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议译为:
要回答这个问题,我们必须认同关注点分离不等于文件类型分离。工程原理的最终目标是提高代码库的可维护性。当关注点分离,被墨守成规地应用为文件类型的分离时,并不能帮助我们在前端应用程序日益复杂的背景下实现该目标。
@zhanglolo 可以发起一个 PR 来完善哈 |
Translated single file component (vuejs#665)
Description of Problem
Proposed Solution
Additional Information