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

Commit 2ef1448

Browse files
committed
docs: update blod symbols
1 parent 6a3ba7a commit 2ef1448

22 files changed

+209
-209
lines changed

src/api/application-api.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ const app = createApp({})
1414

1515
## component
1616

17-
- **参数**
17+
- **参数**
1818

1919
- `{string} name`
2020
- `{Function | Object} [definition]`
2121

22-
- **用法**
22+
- **用法**
2323

2424
注册或检索全局组件。注册还会使用给定的 `name` 参数自动设置组件的 `name`
2525

26-
- **示例**
26+
- **示例**
2727

2828
```js
2929
import { createApp } from 'vue'
@@ -43,11 +43,11 @@ const MyComponent = app.component('my-component', {})
4343

4444
## config
4545

46-
- **用法**
46+
- **用法**
4747

4848
包含应用程序配置的对象。
4949

50-
- **示例**
50+
- **示例**
5151

5252
```js
5353
import { createApp } from 'vue'
@@ -60,16 +60,16 @@ app.config = {...}
6060

6161
## directive
6262

63-
- **参数**
63+
- **参数**
6464

6565
- `{string} name`
6666
- `{Function | Object} [definition]`
6767

68-
- **用法**
68+
- **用法**
6969

7070
注册或检索全局指令。
7171

72-
- **示例**
72+
- **示例**
7373

7474
```js
7575
import { createApp } from 'vue'
@@ -152,28 +152,28 @@ app.directive('focus', {
152152
153153
## mixin
154154
155-
- **参数:**
155+
- **参数**:
156156
157157
- `{Object} mixin`
158158
159-
- **用法:**
159+
- **用法**:
160160
161161
在整个应用程序范围内应用 mixin,一旦注册,它们就可以在当前的 app 中任何组件模板内使用它。插件作者可以使用此方法将自定义行为注入组件。**不建议在应用程序代码中**。
162162
163163
- **参考** [Global Mixin](../guide/mixins.html#global-mixin)
164164
165165
## mount
166166
167-
- **参数:**
167+
- **参数**:
168168
169169
- `{Element | string} rootContainer`
170170
- `{boolean} isHydrate`
171171
172-
- **用法:**
172+
- **用法**:
173173
174174
将应用程序实例的根组件挂载在提供的 DOM 元素上。
175175
176-
- **示例:**
176+
- **示例**:
177177
178178
```html
179179
<body>
@@ -194,15 +194,15 @@ app.mount('#my-app')
194194
195195
## unmount
196196
197-
- **参数:**
197+
- **参数**:
198198
199199
- `{Element | string} rootContainer`
200200
201-
- **用法:**
201+
- **用法**:
202202
203203
在提供的 DOM 元素上卸载应用程序实例的根组件。
204204
205-
- **示例:**
205+
- **示例**:
206206
207207
```html
208208
<body>
@@ -223,11 +223,11 @@ setTimeout(() => app.unmount('#my-app'), 5000)
223223
224224
## use
225225
226-
- **参数:**
226+
- **参数**:
227227
228228
- `{Object | Function} plugin`
229229
230-
- **用法:**
230+
- **用法**:
231231
232232
安装 Vue.js 插件。如果插件是一个对象,它必须暴露一个 `install` 方法。如果它本身是一个函数,它将被视为安装方法。将以 Vue 作为参数调用 install 方法。
233233

src/api/application-config.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ app.config = {...}
1010

1111
## devtools
1212

13-
- **类型**`boolean`
13+
- **类型**`boolean`
1414

15-
- **默认**`true` (在生成打包中是 `false`)
15+
- **默认**`true` (在生成打包中是 `false`)
1616

17-
- **用法**
17+
- **用法**
1818

1919
```js
2020
app.config.devtools = true
@@ -24,11 +24,11 @@ app.config.devtools = true
2424

2525
## errorHandler
2626

27-
- **类型**`Function`
27+
- **类型**`Function`
2828

29-
- **默认**`undefined`
29+
- **默认**`undefined`
3030

31-
- **用法**
31+
- **用法**
3232

3333
```js
3434
app.config.errorHandler = (err, vm, info) => {
@@ -44,11 +44,11 @@ app.config.errorHandler = (err, vm, info) => {
4444
4545
## warnHandler
4646

47-
- **类型**`Function`
47+
- **类型**`Function`
4848

49-
- **默认**`undefined`
49+
- **默认**`undefined`
5050

51-
- **用法**
51+
- **用法**
5252

5353
```js
5454
app.config.warnHandler = function(msg, vm, trace) {
@@ -60,11 +60,11 @@ app.config.warnHandler = function(msg, vm, trace) {
6060

6161
## globalProperties
6262

63-
- **类型**`[key: string]: any`
63+
- **类型**`[key: string]: any`
6464

65-
- **默认**`undefined`
65+
- **默认**`undefined`
6666

67-
- **用法**
67+
- **用法**
6868

6969
```js
7070
app.config.globalProperties.foo = 'bar'
@@ -91,11 +91,11 @@ app.config.globalProperties.$http = () => {}
9191

9292
## isCustomElement
9393

94-
- **类型**`(tag: string) => boolean`
94+
- **类型**`(tag: string) => boolean`
9595

96-
- **默认**`undefined`
96+
- **默认**`undefined`
9797

98-
- **用法**
98+
- **用法**
9999

100100
```js
101101
// 任何以“ion-”开头的元素都将被识别为自定义元素
@@ -108,11 +108,11 @@ app.config.isCustomElement = tag => tag.startsWith('ion-')
108108
109109
## optionMergeStrategies
110110

111-
- **类型**`{ [key: string]: Function }`
111+
- **类型**`{ [key: string]: Function }`
112112

113-
- **默认**`{}`
113+
- **默认**`{}`
114114

115-
- **用法**
115+
- **用法**
116116

117117
```js
118118
const app = Vue.createApp({
@@ -140,9 +140,9 @@ app.mixin({
140140

141141
## performance
142142

143-
- **类型**`boolean`
143+
- **类型**`boolean`
144144

145-
- **默认**`false`
145+
- **默认**`false`
146146

147147
- **Usage**
148148

src/api/basic-reactivity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const obj = reactive({ count: 0 })
1212

1313
响应式转换是“深”的——它影响所有嵌套 property。在基于 [ES2015 Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) 的实现中,返回的代理是****等于原始对象。建议只使用响应式代理,避免依赖原始对象。
1414

15-
**类型声明**
15+
**类型声明**
1616

1717
```ts
1818
function reactive<T extends object>(target: T): UnwrapNestedRefs<T>

src/api/built-in-components.md

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

33
## component
44

5-
- **Props**
5+
- **Props**
66

77
- `is` - `string | ComponentDefinition | ComponentConstructor`
88

9-
- **用法**
9+
- **用法**
1010

1111
渲染一个“元组件”为动态组件。依 `is` 的值,来决定哪个组件被渲染。
1212

@@ -18,11 +18,11 @@
1818
<component :is="$options.components.child"></component>
1919
```
2020

21-
- **参考** [动态组件](../guide/component-dynamic-async.html)
21+
- **参考** [动态组件](../guide/component-dynamic-async.html)
2222

2323
## transition
2424

25-
- **Props**
25+
- **Props**
2626

2727
- `name` - `string` 用于自动生成 CSS 过渡类名。例如:`name: 'fade'` 将自动拓展为 `.fade-enter``.fade-enter-active` 等。
2828
- `appear` - `boolean`,是否在初始渲染时使用过渡。默认为 `false`
@@ -41,7 +41,7 @@
4141
- `leave-active-class` - `string`
4242
- `appear-active-class` - `string`
4343

44-
- **事件**
44+
- **事件**
4545

4646
- `before-enter`
4747
- `before-leave`
@@ -55,7 +55,7 @@
5555
- `leave-cancelled` (仅 `v-show`)
5656
- `appear-cancelled`
5757

58-
- **用法**
58+
- **用法**
5959

6060
`<transition>` 元素作为**单个**元素/组件的过渡效果。`<transition>` 只会把过渡效果应用到其包裹的内容上,而不会额外渲染 DOM 元素,也不会出现在可被检查的组件层级中。
6161

@@ -92,21 +92,21 @@
9292
app.mount('#transition-demo')
9393
```
9494

95-
- **参考** [进入 & 离开过渡](/guide/transitions-enterleave.html#transitioning-single-elements-components)
95+
- **参考**[进入 & 离开过渡](/guide/transitions-enterleave.html#transitioning-single-elements-components)
9696

9797
## transition-group
9898

99-
- **Props**
99+
- **Props**
100100

101101
- `tag` - `string`,默认为 `span`
102102
- `move-class` - 覆盖移动过渡期间应用的 CSS 类。
103103
- 除了 `mode`,其他 attribute 和 `<transition>` 相同。
104104

105-
- **事件**
105+
- **事件**
106106

107107
- 事件和 `<transition>` 相同。
108108

109-
- **用法**
109+
- **用法**
110110

111111
`<transition-group>` 元素作为**多个**元素/组件的过渡效果。`<transition-group>` 渲染一个真实的 DOM 元素。默认渲染 `<span>`,可以通过 `tag` attribute 配置哪个元素应该被渲染。
112112

@@ -122,17 +122,17 @@
122122
</transition-group>
123123
```
124124

125-
- **参考** [列表过渡](/guide/transitions-list.html)
125+
- **参考** [列表过渡](/guide/transitions-list.html)
126126

127127
## keep-alive
128128

129-
- **Props**
129+
- **Props**
130130

131131
- `include` - `string | RegExp | Array`。只有名称匹配的组件会被缓存。
132132
- `exclude` - `string | RegExp | Array`。任何名称匹配的组件都不会被缓存。
133133
- `max` - `number | string`。最多可以缓存多少组件实例。
134134

135-
- **用法**
135+
- **用法**
136136

137137
`<keep-alive>` 包裹动态组件时,会缓存不活动的组件实例,而不是销毁它们。和 `<transition>` 相似,`<keep-alive>` 是一个抽象组件:它自身不会渲染一个 DOM 元素,也不会出现在组件的父组件链中。
138138

@@ -200,25 +200,25 @@
200200
`<keep-alive>` 不会在函数式组件中正常工作,因为它们没有缓存实例。
201201
:::
202202

203-
- **参考** [动态组件 - keep-alive](../guide/component-dynamic-async.html#dynamic-components-with-keep-alive)
203+
- **参考** [动态组件 - keep-alive](../guide/component-dynamic-async.html#dynamic-components-with-keep-alive)
204204

205205
## slot
206206

207-
- **Props**
207+
- **Props**
208208

209209
- `name` - `string`,用于具名插槽
210210

211-
- **用法**
211+
- **用法**
212212

213213
`<slot>` 元素作为组件模板之中的内容分发插槽。`<slot>` 元素自身将被替换。
214214

215215
详细用法,请参考下面教程的链接。
216216

217-
- **参考** [通过插槽分发内容](../guide/component-basics.html#content-distribution-with-slots)
217+
- **参考** [通过插槽分发内容](../guide/component-basics.html#content-distribution-with-slots)
218218

219219
## teleport
220220

221-
- **Props**
221+
- **Props**
222222

223223
- `to` - `string`。需要 prop,必须是有效的查询选择器或 HTMLElement (如果在浏览器环境中使用)。指定将在其中移动 `<teleport>` 内容的目标元素
224224

@@ -243,4 +243,4 @@
243243

244244
请注意,这将移动实际的 DOM 节点,而不是被销毁和重新创建,并且它还将保持任何组件实例的活动状态。所有有状态的 HTML 元素 (即播放的视频) 都将保持其状态。
245245

246-
- **参考** [Teleport 组件](../guide/teleport.html#teleport)
246+
- **参考** [Teleport 组件](../guide/teleport.html#teleport)

src/api/composition-api.md

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

77
一个组件选项,在创建组件**之前**执行,一旦 `props` 被解析,并作为组合 API 的入口点
88

9-
- **入参**
9+
- **入参**
1010

1111
- `{Data} props`
1212
- `{SetupContext} context`
@@ -31,7 +31,7 @@ function setup(props: Data, context: SetupContext): Data
3131
若要获取传递给 `setup()` 的参数的类型推断,请使用 [defineComponent](global-api.html#definecomponent) 是需要的。
3232
:::
3333

34-
- **示例**
34+
- **示例**
3535

3636
使用模板:
3737

0 commit comments

Comments
 (0)