Skip to content

Commit

Permalink
docs: update docs/vue3/composition.md
Browse files Browse the repository at this point in the history
  • Loading branch information
qiufeihong2018 committed Apr 18, 2024
1 parent caf2a7a commit 39b8095
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/vue3/composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function useCount() {
}
```

组件上中使用`count`
组件中使用`count`

```js
export default defineComponent({
Expand Down
4 changes: 2 additions & 2 deletions docs/vue3/goal.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function useMouse(){

### 性能

`vue3`是从什么哪些方面对性能进行进一步优化呢
`vue3`是从哪些方面对性能进行进一步优化呢

- 体积优化
- 编译优化
Expand Down Expand Up @@ -193,7 +193,7 @@ default {

`vue2`中,我们是通过`mixin`实现功能混合,如果多个`mixin`混合,会存在两个非常明显的问题:命名冲突和数据来源不清晰

而通过`composition`这种形式,可以将一些复用的代码抽离出来作为一个函数,只要的使用的地方直接进行调用即可
而通过`composition`这种形式,可以将一些复用的代码抽离出来作为一个函数,只要使用的地方直接进行调用即可

同样是上文的获取鼠标位置的例子

Expand Down
2 changes: 1 addition & 1 deletion docs/vue3/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export function render(_ctx, _cache, $props, $setup, $data, $options) {
当静态内容大到一定量级时候,会用`createStaticVNode`方法在客户端去生成一个static node,这些静态`node`,会被直接`innerHtml`,就不需要创建对象,然后根据对象渲染

```js
div>
<div>
<div>
<span>你好</span>
</div>
Expand Down

0 comments on commit 39b8095

Please sign in to comment.