Skip to content

Commit 62b2dbd

Browse files
kidonngliximomo
authored andcommitted
docs: fix format
1 parent e5c0445 commit 62b2dbd

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> [Vue Composition API](https://vue-composition-api-rfc.netlify.com/)
44
5-
`@vue/composition-api` provides a way to use Vue3's **Composition api** in `Vue2.x`.
5+
`@vue/composition-api` provides a way to use `Vue 3.0`'s **Composition api** in `Vue 2.x`.
66

77
[**中文文档**](./README.zh-CN.md)
88

@@ -87,7 +87,7 @@ const state = reactive({
8787
state.list[0].value === 0; // true
8888

8989
state.list.push(ref(1));
90-
// no unwrap, `.value` is required
90+
// no unwrap, `.value` is required
9191
state.list[1].value === 1; // true
9292
```
9393

@@ -98,7 +98,7 @@ const a = {
9898
count: ref(0),
9999
};
100100
const b = reactive({
101-
list: [a], // a.count will not unwrap!!
101+
list: [a], // `a.count` will not unwrap!!
102102
});
103103

104104
// no unwrap for `count`, `.value` is required
@@ -150,7 +150,7 @@ b.list[1].count === 1; // true
150150
## Template Refs
151151

152152
> :white_check_mark:
153-
Support     :x: Not Support
153+
Support     :x: Not Supported
154154

155155
:white_check_mark:
156156
String ref && return it from `setup()`:
@@ -242,7 +242,7 @@ export default {
242242

243243
If you really want to use template refs in this case, you can access `vm.$refs` via `SetupContext.refs`.
244244

245-
> :warning: **Warning**: The `SetupContext.refs` won't existed in `Vue3.0`. `@vue/composition-api` provide it as a workaround here.
245+
> :warning: **Warning**: The `SetupContext.refs` won't exist in `Vue 3.0`. `@vue/composition-api` provide it as a workaround here.
246246
247247
```js
248248
export default {

README.zh-CN.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> [Vue Composition API](https://vue-composition-api-rfc.netlify.com/)
44
5-
`@vue/composition-api` 使开发者们可以在 `Vue2.x` 中使用 `Vue3` 引入的**基于函数****逻辑复用机制**
5+
`@vue/composition-api` 使开发者们可以在 `Vue 2.x` 中使用 `Vue 3.0` 引入的**基于函数****逻辑复用机制**
66

77
[**English Version**](./README.md)
88

@@ -50,13 +50,13 @@ import VueCompositionApi from '@vue/composition-api';
5050
Vue.use(VueCompositionApi);
5151
```
5252

53-
安装插件后,您就可以使用新的[Composition API](https://vue-composition-api-rfc.netlify.com/)来开发组件了。
53+
安装插件后,您就可以使用新的 [Composition API](https://vue-composition-api-rfc.netlify.com/) 来开发组件了。
5454

5555
# TypeScript
5656

5757
**请使用最新版的 TypeScript,如果你使用了 `vetur`,请将 `vetur.useWorkspaceDependencies` 设为 `true`**
5858

59-
为了让 TypeScript 正确的推到类型,我们必须使用 `createComponent` 来定义组件:
59+
为了让 TypeScript 正确的推导类型,我们必须使用 `createComponent` 来定义组件:
6060

6161
```ts
6262
import { createComponent } from '@vue/composition-api';
@@ -67,7 +67,7 @@ const Component = createComponent({
6767

6868
const Component = {
6969
// 无法进行选项的类型推断
70-
// TypeScript 无法知道这是一个 vue 组件的选项对象
70+
// TypeScript 无法知道这是一个 Vue 组件的选项对象
7171
};
7272
```
7373

@@ -143,7 +143,7 @@ b.list[1].count === 1; // true
143143

144144
## `watch()` API
145145

146-
不支持 `onTrack``onTrigger` 选项.
146+
不支持 `onTrack``onTrigger` 选项
147147

148148
---
149149

@@ -237,9 +237,9 @@ export default {
237237
};
238238
```
239239

240-
如果你依然选择在 `setup()` 中写 `render` 函数,那么你可以使用 `SetupContext.refs` 来访问模板引用,它等价于 vue2 中的 `this.$refs`:
240+
如果你依然选择在 `setup()` 中写 `render` 函数,那么你可以使用 `SetupContext.refs` 来访问模板引用,它等价于 Vue 2.x 中的 `this.$refs`:
241241

242-
> :warning: **警告**: `SetupContext.refs` 并不属于 `Vue3.0` 的一部分, `@vue/composition-api` 将其曝光在 `SetupContext` 中只是临时提供的一种变通方案
242+
> :warning: **警告**: `SetupContext.refs` 并不属于 `Vue 3.0` 的一部分, `@vue/composition-api` 将其曝光在 `SetupContext` 中只是临时提供一种变通方案
243243
244244
```js
245245
export default {
@@ -261,7 +261,7 @@ export default {
261261
};
262262
```
263263

264-
如果项目使用了 TypeScript,你还需要扩展 `SetupContext` 类型:
264+
如果项目使用了 TypeScript,你还需要扩展 `SetupContext` 类型:
265265

266266
```ts
267267
import Vue from 'vue';

0 commit comments

Comments
 (0)