Skip to content

Commit ab1c06d

Browse files
jCodeLifewxsms
andauthored
docs: update src/guide/extras/web-components.md (vuejs#138)
* fix: deleted duplicate words, 上上 -> 上 * fix: revise the paragraph to better understand * fix: correct punctuation * Update src/guide/extras/web-components.md Co-authored-by: wxsm <[email protected]>
1 parent 09c7bc7 commit ab1c06d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/guide/extras/web-components.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
## 在 Vue 中使用自定义元素 {#using-custom-elements-in-vue}
88

9-
Vue [在 Custom Elements Everywhere 测试中取得了 100% 的分数](https://custom-elements-everywhere.com/libraries/vue/results/results.html)。在 Vue 应用中使用自定义元素基本上上与使用原生 HTML 元素的效果相同,但需要留意以下几点:
9+
Vue [在 Custom Elements Everywhere 测试中取得了 100% 的分数](https://custom-elements-everywhere.com/libraries/vue/results/results.html)。在 Vue 应用中使用自定义元素基本上与使用原生 HTML 元素的效果相同,但需要留意以下几点:
1010

1111
### 跳过组件解析 {#skipping-component-resolution}
1212

@@ -132,7 +132,7 @@ document.body.appendChild(
132132

133133
- 基础类型的属性值 (`string``boolean``number`) 会被反射为 attribute。
134134

135-
- Vue 也会在它们被设置为 attribute 时自动转换以 `Boolean``Number` 类型声明的 props 到所期望的类型。当它们被设为 attributes 时 (永远是字符串)。比如下面这样的 props 声明:
135+
- 当它们被设为 attribute 时 (永远是字符串),Vue 也会自动将以 `Boolean``Number` 类型声明的 prop 转换为所期望的类型。比如下面这样的 props 声明:
136136

137137
```js
138138
props: {
@@ -230,7 +230,7 @@ export function register() {
230230

231231
自定义元素和 Vue 组件之间确实存在一定程度的功能重叠:它们都允许我们定义具有数据传递、事件发射和生命周期管理的可重用组件。然而,Web Components 的 API 相对来说是更底层的和更基础的。要构建一个实际的应用程序,我们需要相当多平台没有涵盖的附加功能:
232232

233-
- 一个声明式的、高效的模板系统
233+
- 一个声明式的、高效的模板系统
234234

235235
- 一个响应式状态管理系统,促进跨组件逻辑提取和重用;
236236

0 commit comments

Comments
 (0)