Skip to content

Commit 4d1fdd3

Browse files
committed
Merge branch 'master' of https://github.com/vuejs/docs-next
2 parents c513cfb + 39b7bb0 commit 4d1fdd3

18 files changed

+109
-90
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Este é o repositório oficial da tradução para português brasileiro da docum
88

99
Se você quer participar da tradução, ajudando a traduzir conteúdos que ainda permanecem em inglês e/ou ajudando a revisar conteúdos já traduzidos, sinta-se em casa. Para entender como tudo funciona e saber por onde começar, leia nosso guia de [Contribuição com a Documentação](https://vuejsbr-docs-next.netlify.app/guide/contributing/translations.html).
1010

11-
> O _workflow_ para a realização da tradução está detalhadamente descrito em [Como colaborar com a versão em português?](https://vuejsbr-docs-next.netlify.app/guide/contributing/translations.html#como-colaborar-com-a-versao-em-portugues). Ler é o primeiro passo para todo colaborador em potencial.
11+
> O _workflow_ para a realização da tradução está detalhadamente descrito em [Como colaborar com a versão em português?](https://vuejsbr-docs-next.netlify.app/guide/contributing/translations.html#como-colaborar-com-a-versao-em-portugues) Ler é o primeiro passo para todo colaborador em potencial.
1212
1313
## Escrevendo
1414

src/.vuepress/config.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -110,38 +110,38 @@ const sidebar = {
110110
title: 'Migration Guide',
111111
collapsable: true,
112112
children: [
113-
'migration/introduction',
114-
'migration/array-refs',
115-
'migration/async-components',
116-
'migration/attribute-coercion',
117-
'migration/custom-directives',
118-
'migration/custom-elements-interop',
119-
'migration/data-option',
120-
'migration/events-api',
121-
'migration/filters',
122-
'migration/fragments',
123-
'migration/functional-components',
124-
'migration/global-api',
125-
'migration/global-api-treeshaking',
126-
'migration/inline-template-attribute',
127-
'migration/key-attribute',
128-
'migration/keycode-modifiers',
129-
'migration/props-default-this',
130-
'migration/render-function-api',
131-
'migration/slots-unification',
132-
'migration/transition',
133-
'migration/v-model',
134-
'migration/v-if-v-for',
135-
'migration/v-bind'
113+
'/guide/migration/introduction',
114+
'/guide/migration/array-refs',
115+
'/guide/migration/async-components',
116+
'/guide/migration/attribute-coercion',
117+
'/guide/migration/custom-directives',
118+
'/guide/migration/custom-elements-interop',
119+
'/guide/migration/data-option',
120+
'/guide/migration/events-api',
121+
'/guide/migration/filters',
122+
'/guide/migration/fragments',
123+
'/guide/migration/functional-components',
124+
'/guide/migration/global-api',
125+
'/guide/migration/global-api-treeshaking',
126+
'/guide/migration/inline-template-attribute',
127+
'/guide/migration/key-attribute',
128+
'/guide/migration/keycode-modifiers',
129+
'/guide/migration/props-default-this',
130+
'/guide/migration/render-function-api',
131+
'/guide/migration/slots-unification',
132+
'/guide/migration/transition',
133+
'/guide/migration/v-model',
134+
'/guide/migration/v-if-v-for',
135+
'/guide/migration/v-bind'
136136
]
137137
},
138138
{
139139
title: 'Contribute to the Docs',
140140
collapsable: true,
141141
children: [
142-
'contributing/writing-guide',
143-
'contributing/doc-style-guide',
144-
'contributing/translations'
142+
'/guide/contributing/writing-guide',
143+
'/guide/contributing/doc-style-guide',
144+
'/guide/contributing/translations'
145145
]
146146
}
147147
],

src/.vuepress/theme/components/Navbar.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<SearchBox
2727
v-if="
2828
isAlgoliaSearch === false &&
29-
!(
29+
(
3030
$site.themeConfig.search !== false &&
3131
$page.frontmatter.search !== false
3232
)
@@ -68,7 +68,7 @@ export default {
6868
},
6969
7070
isAlgoliaSearch() {
71-
return this.algolia && this.algolia.apiKey && this.algolia.indexName
71+
return !!(this.algolia && this.algolia.apiKey && this.algolia.indexName)
7272
}
7373
},
7474

src/api/application-config.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,6 @@ const app = Vue.createApp({})
88
app.config = {...}
99
```
1010

11-
## devtools
12-
13-
- **Type:** `boolean`
14-
15-
- **Default:** `true` (`false` in production builds)
16-
17-
- **Usage:**
18-
19-
```js
20-
app.config.devtools = true
21-
```
22-
23-
Configure whether to allow [vue-devtools](https://github.com/vuejs/vue-devtools) inspection. This option's default value is `true` in development builds and `false` in production builds. You can set it to `true` to enable inspection for production builds.
24-
2511
## errorHandler
2612

2713
- **Type:** `Function`

src/api/computed-watch-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ watch([fooRef, barRef], ([foo, bar], [prevFoo, prevBar]) => {
132132
**Typing:**
133133

134134
```ts
135-
// wacthing single source
135+
// watching single source
136136
function watch<T>(
137137
source: WatcherSource<T>,
138138
callback: (

src/api/global-api.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ const AsyncComp = defineAsyncComponent({
192192
// The error component will be displayed if a timeout is
193193
// provided and exceeded. Default: Infinity.
194194
timeout: 3000,
195-
// Defining if component is suspensible
195+
// Defining if component is suspensible. Default: true.
196196
suspensible: false,
197197
/**
198198
*
@@ -201,7 +201,16 @@ const AsyncComp = defineAsyncComponent({
201201
* @param {*} fail End of failure
202202
* @param {*} attempts Maximum allowed retries number
203203
*/
204-
onError(error, retry, fail, attempts) {},
204+
onError(error, retry, fail, attempts) {
205+
if (error.message.match(/fetch/) && attempts <= 3) {
206+
// retry on fetch errors, 3 max attempts
207+
retry()
208+
} else {
209+
// Note that retry/fail are like resolve/reject of a promise:
210+
// one of them must be called for the error handling to continue.
211+
fail()
212+
}
213+
},
205214
})
206215
```
207216

@@ -233,9 +242,9 @@ render() {
233242

234243
### Arguments
235244

236-
Accepts one argument: `component`
245+
Accepts one argument: `name`
237246

238-
#### component
247+
#### name
239248

240249
- **Type:** `String`
241250

src/api/options-misc.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,35 @@
44

55
- **Type:** `string`
66

7-
- **Restriction:** only respected when used as a component option.
8-
97
- **Details:**
108

119
Allow the component to recursively invoke itself in its template. Note that when a component is registered globally with `Vue.createApp({}).component({})`, the global ID is automatically set as its name.
1210

1311
Another benefit of specifying a `name` option is debugging. Named components result in more helpful warning messages. Also, when inspecting an app in the [vue-devtools](https://github.com/vuejs/vue-devtools), unnamed components will show up as `<AnonymousComponent>`, which isn't very informative. By providing the `name` option, you will get a much more informative component tree.
1412

13+
## delimiters
14+
15+
- **Type:** `Array<string>`
16+
17+
- **Default:** `{{ "['\u007b\u007b', '\u007d\u007d']" }}`
18+
19+
- **Restrictions:** This option is only available in the full build, with in-browser template compilation.
20+
21+
- **Details:**
22+
23+
Sets the delimiters used for text interpolation within the template.
24+
25+
Typically this is used to avoid conflicting with server-side frameworks that also use mustache syntax.
26+
27+
- **Example:**
28+
29+
```js
30+
Vue.createApp({
31+
// Delimiters changed to ES6 template string style
32+
delimiters: ['${', '}']
33+
})
34+
```
35+
1536
## inheritAttrs
1637

1738
- **Type:** `boolean`
@@ -22,14 +43,13 @@
2243

2344
By default, parent scope attribute bindings that are not recognized as props will "fallthrough". This means that when we have a single-root component, these bindings will be applied to the root element of the child component as normal HTML attributes. When authoring a component that wraps a target element or another component, this may not always be the desired behavior. By setting `inheritAttrs` to `false`, this default behavior can be disabled. The attributes are available via the `$attrs` instance property and can be explicitly bound to a non-root element using `v-bind`.
2445

25-
Note: this option does **not** affect `class` and `style` bindings.
26-
2746
- **Usage:**
2847

2948
```js
3049
app.component('base-input', {
3150
inheritAttrs: false,
3251
props: ['label', 'value'],
52+
emits: ['input'],
3353
template: `
3454
<label>
3555
{{ label }}

src/guide/a11y-resources.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,13 @@
2424
- Automated Tools
2525
- [Lighthouse](https://chrome.google.com/webstore/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk)
2626
- [WAVE](https://chrome.google.com/webstore/detail/wave-evaluation-tool/jbbplnpkjmmeebjpijfedlgcdilocofh)
27-
2827
- Color Tools
2928
- [WebAim Color Contrast](https://webaim.org/resources/contrastchecker/)
3029
- [WebAim Link Color Contrast](https://webaim.org/resources/linkcontrastchecker)
31-
3230
- Other Helpful Tools
3331
- [HeadingMap](https://chrome.google.com/webstore/detail/headingsmap/flbjommegcjonpdmenkdiocclhjacmbi?hl=en…)
34-
3532
- [Color Oracle](https://colororacle.org)
36-
3733
- [Focus Indicator](https://chrome.google.com/webstore/detail/focus-indicator/heeoeadndnhebmfebjccbhmccmaoedlf?hl=en-US…)
38-
3934
- [NerdeFocus](https://chrome.google.com/webstore/detail/nerdefocus/lpfiljldhgjecfepfljnbjnbjfhennpd?hl=en-US…)
4035

4136
## Users
@@ -45,11 +40,8 @@ The World Health Organization estimates that 15% of the world's population has s
4540
There are a huge range of disabilities, which can be divided roughly into four categories:
4641

4742
- _[Visual](https://webaim.org/articles/visual/)_ - These users can benefit from the use of screen readers, screen magnification, controlling screen contrast, or braille display.
48-
4943
- _[Auditory](https://webaim.org/articles/auditory/)_ - These users can benefit from captioning, transcripts or sign language video.
50-
51-
- _[Motor](https://webaim.org/articles/motor/)_ - These users can benefit from a range of [assistive technologies for motor impairments](https://webaim.org/articles/motor/assistive): voice recognition software, eye tracking, single-switch access, head wand, single-switch access, sip and puff switch, oversized trackball mouse, adaptive keyboard or other assistive technologies.
52-
44+
- _[Motor](https://webaim.org/articles/motor/)_ - These users can benefit from a range of [assistive technologies for motor impairments](https://webaim.org/articles/motor/assistive): voice recognition software, eye tracking, single-switch access, head wand, sip and puff switch, oversized trackball mouse, adaptive keyboard or other assistive technologies.
5345
- _[Cognitive](https://webaim.org/articles/cognitive/)_ - These users can benefit from supplemental media, structural organization of content, clear and simple writing.
5446

5547
Check out the following links from WebAim to understand from users:

src/guide/a11y-semantics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Though you might have seen labels wrapping the input fields like this:
6060
</label>
6161
```
6262

63-
Explicitly setting the labels with an matching id is better supported by assistive technology.
63+
Explicitly setting the labels with a matching id is better supported by assistive technology.
6464
:::
6565

6666
#### aria-label

src/guide/component-slots.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Attributes bound to a `<slot>` element are called **slot props**. Now, in the pa
274274
<todo-list>
275275
<template v-slot:default="slotProps">
276276
<i class="fas fa-check"></i>
277-
<span class="green">{{ slotProps.item }}<span>
277+
<span class="green">{{ slotProps.item }}</span>
278278
</template>
279279
</todo-list>
280280
```
@@ -290,7 +290,7 @@ In cases like above, when _only_ the default slot is provided content, the compo
290290
```html
291291
<todo-list v-slot:default="slotProps">
292292
<i class="fas fa-check"></i>
293-
<span class="green">{{ slotProps.item }}<span>
293+
<span class="green">{{ slotProps.item }}</span>
294294
</todo-list>
295295
```
296296

@@ -299,7 +299,7 @@ This can be shortened even further. Just as non-specified content is assumed to
299299
```html
300300
<todo-list v-slot="slotProps">
301301
<i class="fas fa-check"></i>
302-
<span class="green">{{ slotProps.item }}<span>
302+
<span class="green">{{ slotProps.item }}</span>
303303
</todo-list>
304304
```
305305

@@ -310,7 +310,7 @@ Note that the abbreviated syntax for default slot **cannot** be mixed with named
310310
<todo-list v-slot="slotProps">
311311
<todo-list v-slot:default="slotProps">
312312
<i class="fas fa-check"></i>
313-
<span class="green">{{ slotProps.item }}<span>
313+
<span class="green">{{ slotProps.item }}</span>
314314
</todo-list>
315315
<template v-slot:other="otherSlotProps">
316316
slotProps is NOT available here
@@ -324,7 +324,7 @@ Whenever there are multiple slots, use the full `<template>` based syntax for _a
324324
<todo-list>
325325
<template v-slot:default="slotProps">
326326
<i class="fas fa-check"></i>
327-
<span class="green">{{ slotProps.item }}<span>
327+
<span class="green">{{ slotProps.item }}</span>
328328
</template>
329329

330330
<template v-slot:other="otherSlotProps">
@@ -357,7 +357,7 @@ This can make the template much cleaner, especially when the slot provides many
357357
```html
358358
<todo-list v-slot="{ item: todo }">
359359
<i class="fas fa-check"></i>
360-
<span class="green">{{ todo }}<span>
360+
<span class="green">{{ todo }}</span>
361361
</todo-list>
362362
```
363363

0 commit comments

Comments
 (0)