Skip to content

Commit 363641a

Browse files
chore: standartize Array casing
1 parent 713650e commit 363641a

File tree

7 files changed

+29
-29
lines changed

7 files changed

+29
-29
lines changed

src/api/built-in-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173

174174
- **`include` and `exclude`**
175175

176-
The `include` and `exclude` props allow components to be conditionally cached. Both props can be a comma-delimited string, a RegExp or an Array:
176+
The `include` and `exclude` props allow components to be conditionally cached. Both props can be a comma-delimited string, a RegExp or an array:
177177

178178
```html
179179
<!-- comma-delimited string -->

src/api/instance-methods.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Instance Methods
22

3-
## $watch
3+
## \$watch
44

55
- **Arguments:**
66

@@ -59,7 +59,7 @@
5959
})
6060
```
6161

62-
When watched value is an Object or Array, any changes to its properties or elements won't trigger the watcher because they reference the same Object/Array:
62+
When watched value is an object or array, any changes to its properties or elements won't trigger the watcher because they reference the same object/array:
6363

6464
```js
6565
const app = Vue.createApp({
@@ -81,16 +81,16 @@
8181
})
8282
},
8383
methods: {
84-
// These methods won't trigger a watcher because we changed only a property of Object/Array,
85-
// not the Object/Array itself
84+
// These methods won't trigger a watcher because we changed only a property of object/array,
85+
// not the object/array itself
8686
changeArticleText() {
8787
this.article.text = 'Vue 3 is awesome'
8888
},
8989
addComment() {
9090
this.comments.push('New comment')
9191
},
9292

93-
// These methods will trigger a watcher because we replaced Object/Array completely
93+
// These methods will trigger a watcher because we replaced object/array completely
9494
changeWholeArticle() {
9595
this.article = { text: 'Vue 3 is awesome' }
9696
},
@@ -121,7 +121,7 @@
121121

122122
- **Option: deep**
123123

124-
To also detect nested value changes inside Objects, you need to pass in `deep: true` in the options argument. Note that you don't need to do so to listen for Array mutations.
124+
To also detect nested value changes inside Objects, you need to pass in `deep: true` in the options argument. Note that you don't need to do so to listen for array mutations.
125125

126126
```js
127127
vm.$watch('someObject', callback, {
@@ -160,7 +160,7 @@
160160

161161
```js
162162
let unwatch = null
163-
163+
164164
unwatch = vm.$watch(
165165
'value',
166166
function() {
@@ -176,24 +176,24 @@
176176
- **Option: flush**
177177

178178
The `flush` option allows for greater control over the timing of the callback. It can be set to `'pre'`, `'post'` or `'sync'`.
179-
179+
180180
The default value is `'pre'`, which specifies that the callback should be invoked before rendering. This allows the callback to update other values before the template runs.
181-
181+
182182
The value `'post'` can be used to defer the callback until after rendering. This should be used if the callback needs access to the updated DOM or child components via `$refs`.
183183

184184
If `flush` is set to `'sync'`, the callback will be called synchronously, as soon as the value changes.
185185

186186
For both `'pre'` and `'post'`, the callback is buffered using a queue. The callback will only be added to the queue once, even if the watched value changes multiple times. The interim values will be skipped and won't be passed to the callback.
187-
187+
188188
Buffering the callback not only improves performance but also helps to ensure data consistency. The watchers won't be triggered until the code performing the data updates has finished.
189-
189+
190190
`'sync'` watchers should be used sparingly, as they don't have these benefits.
191191

192192
For more information about `flush` see [Effect Flush Timing](../guide/reactivity-computed-watchers.html#effect-flush-timing).
193193

194194
- **See also:** [Watchers](../guide/computed.html#watchers)
195195

196-
## $emit
196+
## \$emit
197197

198198
- **Arguments:**
199199

@@ -266,21 +266,21 @@
266266
</div>
267267
`
268268
})
269-
269+
270270
app.mount('#emit-example-argument')
271271
```
272272

273273
- **See also:**
274274
- [`emits` option](./options-data.html#emits)
275275
- [Emitting a Value With an Event](../guide/component-basics.html#emitting-a-value-with-an-event)
276276

277-
## $forceUpdate
277+
## \$forceUpdate
278278

279279
- **Usage:**
280280

281281
Force the component instance to re-render. Note it does not affect all child components, only the instance itself and child components with inserted slot content.
282282

283-
## $nextTick
283+
## \$nextTick
284284

285285
- **Arguments:**
286286

src/api/options-data.md

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

178178
- **Details:**
179179

180-
An object where keys are expressions to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The component instance will call `$watch()` for each entry in the object at instantiation. See [$watch](instance-methods.html#watch) for more information about the `deep`, `immediate` and `flush` options.
180+
An object where keys are expressions to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The component instance will call `$watch()` for each entry in the object at instantiation. See [\$watch](instance-methods.html#watch) for more information about the `deep`, `immediate` and `flush` options.
181181

182182
- **Example:**
183183

@@ -255,7 +255,7 @@
255255

256256
- **Details:**
257257

258-
A list/hash of custom events that can be emitted from the component. It has an Array-based simple syntax and an alternative Object-based syntax that allows to configure an event validation.
258+
A list/hash of custom events that can be emitted from the component. It has an array-based simple syntax and an alternative Object-based syntax that allows to configure an event validation.
259259

260260
In Object-based syntax, the value of each property can either be `null` or a validator function. The validation function will receive the additional arguments passed to the `$emit` call. For example, if `this.$emit('foo', 1)` is called, the corresponding validator for `foo` will receive the argument `1`. The validator function should return a boolean to indicate whether the event arguments are valid.
261261

src/guide/component-custom-events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ It is recommended to define all emitted events in order to better document how a
5151

5252
### Validate Emitted Events
5353

54-
Similar to prop type validation, an emitted event can be validated if it is defined with the Object syntax instead of the Array syntax.
54+
Similar to prop type validation, an emitted event can be validated if it is defined with the Object syntax instead of the array syntax.
5555

5656
To add validation, the event is assigned a function that receives the arguments passed to the `$emit` call and returns a boolean to indicate whether the event is valid or not.
5757

src/guide/forms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Single checkbox, boolean value:
6060

6161
<common-codepen-snippet title="Handling forms: checkbox" slug="PoqyJVE" :preview="false" />
6262

63-
Multiple checkboxes, bound to the same Array:
63+
Multiple checkboxes, bound to the same array:
6464

6565
```html
6666
<div id="v-model-multiple-checkboxes">
@@ -145,7 +145,7 @@ Vue.createApp({
145145
If the initial value of your `v-model` expression does not match any of the options, the `<select>` element will render in an "unselected" state. On iOS this will cause the user not being able to select the first item because iOS does not fire a change event in this case. It is therefore recommended to provide a disabled option with an empty value, as demonstrated in the example above.
146146
:::
147147

148-
Multiple select (bound to Array):
148+
Multiple select (bound to array):
149149

150150
```html
151151
<select v-model="selected" multiple>

src/guide/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ You can change `seen` from `true` to `false` in the sandbox below to check the e
184184

185185
<common-codepen-snippet title="Conditional rendering" slug="oNXdbpB" tab="js,result" />
186186

187-
There are quite a few other directives, each with its own special functionality. For example, the `v-for` directive can be used to display a list of items using the data from an Array:
187+
There are quite a few other directives, each with its own special functionality. For example, the `v-for` directive can be used to display a list of items using the data from an array:
188188

189189
```html
190190
<div id="list-rendering">

src/guide/render-function.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ render() {
389389

390390
### Slots
391391

392-
We can access slot contents as Arrays of VNodes from [`this.$slots`](../api/instance-properties.html#slots):
392+
We can access slot contents as arrays of VNodes from [`this.$slots`](../api/instance-properties.html#slots):
393393

394394
```js
395395
render() {
@@ -408,7 +408,7 @@ render() {
408408
}
409409
```
410410

411-
For component VNodes, we need to pass the children to `h` as an Object rather than an Array. Each property is used to populate the slot of the same name:
411+
For component VNodes, we need to pass the children to `h` as an object rather than an array. Each property is used to populate the slot of the same name:
412412

413413
```js
414414
render() {
@@ -435,7 +435,7 @@ render() {
435435
// Calls to resolveComponent should be outside the slot function
436436
const Button = Vue.resolveComponent('MyButton')
437437
const Icon = Vue.resolveComponent('MyIcon')
438-
438+
439439
return Vue.h(
440440
Button,
441441
null,
@@ -449,7 +449,7 @@ render() {
449449
this.text
450450
]
451451
}
452-
}
452+
}
453453
)
454454
}
455455
```
@@ -472,15 +472,15 @@ render() {
472472
{
473473
// If we want to pass on a slot function we can
474474
header: this.$slots.header,
475-
475+
476476
// If we need to manipulate the slot in some way
477477
// then we need to wrap it in a new function
478478
default: (props) => {
479479
const children = this.$slots.default ? this.$slots.default(props) : []
480-
480+
481481
return children.concat(Vue.h('div', 'Extra child'))
482482
}
483-
}
483+
}
484484
)
485485
}
486486
```

0 commit comments

Comments
 (0)