Skip to content

Commit f3ed81b

Browse files
committed
Merge branch 'main' of https://github.com/vuejs/docs
2 parents d123362 + 05c75f6 commit f3ed81b

File tree

17 files changed

+111
-32
lines changed

17 files changed

+111
-32
lines changed

.vitepress/config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import fs from 'fs'
22
import path from 'path'
33
import { defineConfigWithTheme } from 'vitepress'
4+
import type { Config as ThemeConfig } from '@vue/theme'
45
import baseConfig from '@vue/theme/config'
56
import { headerPlugin } from './headerMdPlugin'
6-
import type { Config } from '@vue/theme'
7-
import { UserConfig } from 'vitepress'
87

98
const nav = [
109
{
@@ -531,8 +530,8 @@ export const sidebar = {
531530
]
532531
}
533532

534-
export default defineConfigWithTheme<Config>({
535-
extends: baseConfig as () => UserConfig<Config>,
533+
export default defineConfigWithTheme<ThemeConfig>({
534+
extends: baseConfig,
536535

537536
lang: 'en-US',
538537
title: 'Vue.js',
@@ -571,6 +570,7 @@ export default defineConfigWithTheme<Config>({
571570
{
572571
src: 'https://cdn.usefathom.com/script.js',
573572
'data-site': 'XNOLWPLB',
573+
'data-spa': 'auto',
574574
defer: ''
575575
}
576576
]

.vitepress/theme/components/PreferenceSwitch.vue

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import { VTSwitch, VTIconChevronDown } from '@vue/theme'
33
import { useRoute } from 'vitepress'
4-
import { ref, computed, inject, Ref } from 'vue'
4+
import { inject, Ref } from 'vue'
55
import {
66
preferCompositionKey,
77
preferComposition,
@@ -10,17 +10,15 @@ import {
1010
} from './preferences'
1111
1212
const route = useRoute()
13-
const show = computed(() =>
13+
const show = $computed(() =>
1414
/^\/(guide|tutorial|examples)\//.test(route.path)
1515
)
16-
const showSFC = computed(() => !/^\/guide/.test(route.path))
17-
const isOpen = ref(
18-
typeof localStorage !== 'undefined' &&
19-
!localStorage.getItem(preferCompositionKey)
20-
)
16+
const showSFC = $computed(() => !/^\/guide/.test(route.path))
17+
18+
let isOpen = $ref(true)
2119
2220
const toggleOpen = () => {
23-
isOpen.value = !isOpen.value
21+
isOpen = !isOpen
2422
}
2523
2624
const removeOutline = (e: Event) => {

src/api/composition-api-lifecycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Registers a callback to be called after the component has been unmounted.
115115

116116
```vue
117117
<script setup>
118-
import { onMounted, unUnmounted } from 'vue'
118+
import { onMounted, onUnmounted } from 'vue'
119119
120120
let intervalId
121121
onMounted(() => {

src/api/options-rendering.md

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

33
## template
44

5-
A string template for the component instance.
5+
A string template for the component.
66

77
- **Type**
88

@@ -14,13 +14,13 @@ A string template for the component instance.
1414

1515
- **Details**
1616

17-
Template provided via the `template` option will be compiled on-the-fly, therefore it is only supported when using the full build (i.e. the standalone `vue.js` that can compile templates in the browser).
18-
19-
The template will **replace** the `innerHTML` of mounted element. Any existing markup inside the mounted element will be ignored.
17+
A template provided via the `template` option will be compiled on-the-fly at runtime. It is only supported when using a full build of Vue that includes the template compiler. The builds that include the template compiler have the word `runtime` in their names, e.g. `vue.runtime.esm-bundler.js`. Consult the [dist file guide](https://github.com/vuejs/core/tree/main/packages/vue#which-dist-file-to-use) for more details about the different builds.
2018

2119
If the string starts with `#` it will be used as a `querySelector` and use the selected element's `innerHTML` as the template string. This allows the source template to be authored using native `<template>` elements.
2220

23-
If the `render` is also present in the same component, `template` will be ignored.
21+
If the `render` option is also present in the same component, `template` will be ignored.
22+
23+
If the root component of your application doesn't have a `template` or `render` option specified, Vue will try to use the `innerHTML` of the mounted element as the template instead.
2424

2525
:::warning Security Note
2626
Only use template sources that you can trust. Do not use user-provided content as your template. See [Security Guide](/guide/best-practices/security.html#rule-no-1-never-use-non-trusted-templates) for more details.

src/api/options-state.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Declare the props of a component.
7878
7979
- **Details**
8080
81-
In Vue, all component props need to be explicit declared. Component props can be declared in two forms:
81+
In Vue, all component props need to be explicitly declared. Component props can be declared in two forms:
8282
8383
- Simple form using an array of strings
8484
- Full form using an object where each property key is the name of the prop, and the value is the prop's type (a constructor function) or advanced options.

src/api/sfc-script-setup.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,31 @@ import * as Form from './form-components'
127127
</template>
128128
```
129129

130+
## Using Custom Directives
131+
132+
Globally registered custom directives just work as normal. Local custom directives don't need to be explicitly registered with `<script setup>`, but they must follow the naming scheme `vNameOfDirective`:
133+
134+
```vue
135+
<script setup>
136+
const vMyDirective = {
137+
beforeMount: (el) => {
138+
// do something with the element
139+
}
140+
}
141+
</script>
142+
<template>
143+
<h1 v-my-directive>This is a Heading</h1>
144+
</template>
145+
```
146+
147+
If you're importing a directive from elsewhere, it can be renamed to fit the required naming scheme:
148+
149+
```vue
150+
<script setup>
151+
import { myDirective as vMyDirective } from './MyDirective.js'
152+
</script>
153+
```
154+
130155
## defineProps() & defineEmits()
131156

132157
To declare options like `props` and `emits` with full type inference support, we can use the `defineProps` and `defineEmits` APIs, which are automatically available inside `<script setup>`:

src/examples/src/cells/App/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<tbody>
99
<tr v-for="i in cells[0].length">
1010
<th>{{ i - 1 }}</th>
11-
<td v-for="c, j in cols">
11+
<td v-for="(c, j) in cols">
1212
<Cell :r="i - 1" :c="j"></Cell>
1313
</td>
1414
</tr>

src/guide/best-practices/accessibility.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,27 @@ Avoid using placeholders as they can confuse many users.
277277

278278
One of the issues with placeholders is that they don't meet the [color contrast criteria](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html) by default; fixing the color contrast makes the placeholder look like pre-populated data in the input fields. Looking at the following example, you can see that the Last Name placeholder which meets the color contrast criteria looks like pre-populated data:
279279

280+
```vue-html
281+
<form
282+
class="demo"
283+
action="/dataCollectionLocation"
284+
method="post"
285+
autocomplete="on"
286+
>
287+
<div v-for="item in formItems" :key="item.id" class="form-item">
288+
<label :for="item.id">{{ item.label }}: </label>
289+
<input
290+
type="text"
291+
:id="item.id"
292+
:name="item.id"
293+
v-model="item.value"
294+
:placeholder="item.placeholder"
295+
/>
296+
</div>
297+
<button type="submit">Submit</button>
298+
</form>
299+
```
300+
280301
<!-- <common-codepen-snippet title="Form Placeholder" slug="ExZvvMw" :height="265" tab="js,result" theme="light" :preview="false" :editable="false" /> -->
281302

282303
It is best to provide all the information the user needs to fill out forms outside any inputs.

src/guide/components/images/scoped-slots.svg

Lines changed: 29 additions & 0 deletions
Loading

src/guide/components/slots.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ Receiving the slot props is a bit different when using a single default slot vs.
344344
</MyComponent>
345345
```
346346

347+
![scoped slots diagram](./images/scoped-slots.svg)
348+
349+
<!-- https://www.figma.com/file/QRneoj8eIdL1kw3WQaaEyc/scoped-slot -->
350+
347351
<div class="composition-api">
348352

349353
[Try it in the Playground](https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCBNeUNvbXBvbmVudCBmcm9tICcuL015Q29tcG9uZW50LnZ1ZSdcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG5cdDxNeUNvbXBvbmVudCB2LXNsb3Q9XCJzbG90UHJvcHNcIj5cbiAgXHR7eyBzbG90UHJvcHMudGV4dCB9fSB7eyBzbG90UHJvcHMuY291bnQgfX1cbiAgPC9NeUNvbXBvbmVudD5cbjwvdGVtcGxhdGU+IiwiaW1wb3J0LW1hcC5qc29uIjoie1xuICBcImltcG9ydHNcIjoge1xuICAgIFwidnVlXCI6IFwiaHR0cHM6Ly9zZmMudnVlanMub3JnL3Z1ZS5ydW50aW1lLmVzbS1icm93c2VyLmpzXCJcbiAgfVxufSIsIk15Q29tcG9uZW50LnZ1ZSI6IjxzY3JpcHQgc2V0dXA+XG5jb25zdCBncmVldGluZ01lc3NhZ2UgPSAnaGVsbG8nXG48L3NjcmlwdD5cblxuPHRlbXBsYXRlPlxuICA8ZGl2PlxuICBcdDxzbG90IDp0ZXh0PVwiZ3JlZXRpbmdNZXNzYWdlXCIgOmNvdW50PVwiMVwiPjwvc2xvdD5cblx0PC9kaXY+XG48L3RlbXBsYXRlPiJ9)
@@ -403,7 +407,7 @@ Named scoped slots work similarly - slot props are accessible as the value of th
403407
</template>
404408
405409
<template #footer="footerProps">
406-
{{ headerProps }}
410+
{{ footerProps }}
407411
</template>
408412
</MyComponent>
409413
```
71.6 KB
Loading

src/guide/essentials/watchers.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
try {
3131
const res = await fetch('https://yesno.wtf/api')
3232
this.answer = (await res.json()).answer
33-
} catch (e) {
33+
} catch (error) {
3434
this.answer = 'Error! Could not reach the API. ' + error
3535
}
3636
}
@@ -46,7 +46,7 @@ export default {
4646
<p>{{ answer }}</p>
4747
```
4848

49-
[Try it in the Playground](https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdD5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgZGF0YSgpIHtcbiAgICByZXR1cm4ge1xuICAgICAgcXVlc3Rpb246ICcnLFxuICAgICAgYW5zd2VyOiAnUXVlc3Rpb25zIHVzdWFsbHkgY29udGFpbiBhIHF1ZXN0aW9uIG1hcmsuIDstKSdcbiAgICB9XG4gIH0sXG4gIHdhdGNoOiB7XG4gICAgLy8gd2hlbmV2ZXIgcXVlc3Rpb24gY2hhbmdlcywgdGhpcyBmdW5jdGlvbiB3aWxsIHJ1blxuICAgIHF1ZXN0aW9uKG5ld1F1ZXN0aW9uLCBvbGRR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The `watch` option also supports a dot-delimited path as the key:
5252

@@ -81,7 +81,7 @@ watch(question, async (newQuestion, oldQuestion) => {
8181
try {
8282
const res = await fetch('https://yesno.wtf/api')
8383
answer.value = (await res.json()).answer
84-
} catch (e) {
84+
} catch (error) {
8585
answer.value = 'Error! Could not reach the API. ' + error
8686
}
8787
}
@@ -97,7 +97,7 @@ watch(question, async (newQuestion, oldQuestion) => {
9797
</template>
9898
```
9999

100-
[Try it in the Playground](https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHNjcmlwdCBzZXR1cD5cbmltcG9ydCB7IHJlZiwgd2F0Y2ggfSBmcm9tICd2dWUnXG5cbmNvbnN0IHF1ZXN0aW9uID0gcmVmKCcnKVxuY29uc3QgYW5zd2VyID0gcmVmKCdRdWVzdGlvbnMgdXN1YWxseSBjb250YWluIGEgcXVlc3Rpb24gbWFyay4gOy0pJylcblxud2F0Y2gocXVlc3Rpb24sIGFzeW5jIChuZXdRdWVzdGlvbikgPT4ge1xuICBpZiAobmV3UXVlc3Rpb24uaW5kZXhPZignPycpID4gLTEpIHtcbiAgICBhbnN3ZXIudmFsdWUgPSAnVGhpbmtpbmcuLi4nXG4gICAgdHJ5IHtcbiAgICAgIGNvbnN0IHJlcyA9IGF3YWl0IGZldGNoKCdodHRwczovL3llc25vLnd0Zi9hcGknKVxuICAgICAgYW5zd2VyLnZhbHVlID0gKGF3YWl0IHJlcy5qc29uKCkpLmFuc3dlclxuICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgIGFuc3dlci52YWx1ZSA9ICdFcnJvciEgQ291bGQgbm90IHJlYWNoIHRoZSBBUEkuICcgKyBlcnJvclxuICAgIH1cbiAgfVxufSlcbjwvc2NyaXB0PlxuXG48dGVtcGxhdGU+XG4gIDxwPlxuICAgIEFzayBhIHllcy9ubyBxdWVzdGlvbjpcbiAgICA8aW5wdXQgdi1tb2RlbD1cInF1ZXN0aW9uXCIgLz5cbiAgPC9wPlxuICA8cD57eyBhbnN3ZXIgfX08L3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iJ7XG4gIFwiaW1wb3J0c1wiOiB7XG4gICAgXCJ2dWVcIjogXCJodHRwczovL3NmYy52dWVqcy5vcmcvdnVlLnJ1bnRpbWUuZXNtLWJyb3dzZXIuanNcIlxuICB9XG59In0=)
101101

102102
### Watch Source Types
103103

src/guide/extras/composition-api-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ If you are interested in learning how to use Vue with Composition API, you can s
5353

5454
The primary advantage of Composition API is that it enables clean, efficient logic reuse in the form of [Composable functions](/guide/reusability/composables.html). It solves [all the drawbacks of mixins](/guide/reusability/composables.html#vs-mixins), the primary logic reuse mechanism for Options API.
5555

56-
Composition API's logic reuse capability has given rise to impressive community projects such as [VueUse](https://vueuse.org/), an ever-growing collection of composable utilities. It also serves as a clean mechanism for easily integrating stateful third-party libraries into Vue's reactivity system, for example [RxJS](https://vueuse.org/rxjs/readme.html#vueuse-rxjs).
56+
Composition API's logic reuse capability has given rise to impressive community projects such as [VueUse](https://vueuse.org/), an ever-growing collection of composable utilities. It also serves as a clean mechanism for easily integrating stateful third-party services or libraries into Vue's reactivity system, for example [immutable data](/guide/extras/reactivity-in-depth.html#immutable-data), [state machines](/guide/extras/reactivity-in-depth.html#state-machines), and [RxJS](https://vueuse.org/rxjs/readme.html#vueuse-rxjs).
5757

5858
### More Flexible Code Organization
5959

src/guide/extras/demos/SpreadSheet.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ const cols = cells.map((_, i) => String.fromCharCode(65 + i))
2626

2727
<style scoped>
2828
th {
29-
background-color: #eee;
29+
color: var(--vt-c-text-1);
30+
background-color: var(--vt-c-bg-mute);
3031
padding: 0 1em;
3132
}
3233
@@ -39,7 +40,7 @@ tr:first-of-type th:first-of-type {
3940
}
4041
4142
td {
42-
border: 1px solid #ccc;
43+
border: 1px solid var(--vt-c-bg-mute);
4344
padding: 0;
4445
}
4546
</style>

src/guide/extras/demos/SpreadSheetCell.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ function update(e) {
3333
height: 1.5em;
3434
line-height: 1.5;
3535
font-size: 15px;
36+
color: var(--vt-c-text-1);
3637
}
3738
3839
.cell span {
@@ -46,7 +47,7 @@ function update(e) {
4647
}
4748
4849
.cell input:focus {
49-
border: 2px solid blue;
50-
background-color: #fff;
50+
border: 2px solid var(--vt-c-divider);
51+
color: var(--vt-c-text-1);
5152
}
5253
</style>

src/guide/scaling-up/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ cy.get(valueSelector).should('be.visible').and('contain.text', '0')
217217

218218
- [Cypress Component Testing](https://on.cypress.io/component) for components whose expected behavior depends on properly rendering styles or triggering native DOM events. Can be used with Testing Library via [@testing-library/cypress](https://testing-library.com/docs/cypress-testing-library/intro).
219219

220-
The main differences between Vitest and browser-based runners are speed and execution context. In short, browser-based runners, like Cypress, can catch issues that node-based runners, like Vitest, cannot (e.g. style issues, real native DOM events, cookies, local storage, and network failures), but browser-based runners are *orders of magnitude slower than Vitest* because they doopen a browser, compile your stylesheets, and more. Cypress is a browser-based runner that supports component testing. Please read [Vitest's comparison page](https://vitest.dev/guide/comparisons.html#cypress) for the latest information comparing Vitest and Cypress.
220+
The main differences between Vitest and browser-based runners are speed and execution context. In short, browser-based runners, like Cypress, can catch issues that node-based runners, like Vitest, cannot (e.g. style issues, real native DOM events, cookies, local storage, and network failures), but browser-based runners are *orders of magnitude slower than Vitest* because they do open a browser, compile your stylesheets, and more. Cypress is a browser-based runner that supports component testing. Please read [Vitest's comparison page](https://vitest.dev/guide/comparisons.html#cypress) for the latest information comparing Vitest and Cypress.
221221

222222
### Mounting Libraries
223223

src/tutorial/src/step-1/description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The goal of this tutorial is to quickly give you an experience of what it feels
66

77
## Prerequisites
88

9-
The tutorial assumes basic familiarity with HTML, CSS and JavaScript. If you are totally new to front development, it might not be the best idea to jump right into a framework as your first step - grasp the basics then come back! Prior experience with other frameworks helps, but is not required.
9+
The tutorial assumes basic familiarity with HTML, CSS and JavaScript. If you are totally new to front-end development, it might not be the best idea to jump right into a framework as your first step - grasp the basics then come back! Prior experience with other frameworks helps, but is not required.
1010

1111
## How to Use This Tutorial
1212

0 commit comments

Comments
 (0)