Skip to content

Commit 697df43

Browse files
Merge branch 'main' into patch-1
2 parents 347e083 + 840abfb commit 697df43

File tree

16 files changed

+25
-23
lines changed

16 files changed

+25
-23
lines changed

.github/contributing/writing-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Writing documentation is an exercise in empathy. We're not describing an objecti
8585

8686
### Tips, Callouts, Alerts, and Line Highlights
8787

88-
We have some dedicated styles to denote something that's worth highlighting in a particular way. These are captured [on this page](https://v3.vuejs.org/guide/doc-style-guide.html#alerts). **They are to be used sparingly.**
88+
We have some dedicated styles to denote something that's worth highlighting in a particular way. These are captured [on this page](https://vitepress.vuejs.org/guide/markdown.html#custom-containers). **They are to be used sparingly.**
8989

9090
There is a certain temptation to abuse these styles, as one can simply add a change inside a callout. However, this breaks up the flow of reading for the user, and thus, should only be used in special circumstances. Wherever possible, we should attempt to create a narrative and flow within the page to respect the readers cognitive load.
9191

src/api/built-in-special-elements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ A "meta component" for rendering dynamic components or elements.
3434
import Bar from './Bar.vue'
3535
3636
export default {
37-
components: { Foo, Bar }
37+
components: { Foo, Bar },
3838
data() {
3939
return {
4040
view: 'Foo'

src/api/reactivity-advanced.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ Creates a customized ref with explicit control over its dependency tracking and
9494
Creating a debounced ref that only updates the value after a certain timeout after the latest set call:
9595

9696
```js
97-
function useDebouncedRef(value, delay = 200) {
97+
import { customRef } from 'vue'
98+
99+
export function useDebouncedRef(value, delay = 200) {
98100
let timeout
99101
return customRef((track, trigger) => {
100102
return {

src/api/sfc-spec.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ p {{ msg }}
105105

106106
Note that integration with various pre-processors may differ by toolchain. Check out the respective documentation for examples:
107107

108-
- [Vite](https://vitejs.dev](features.html#css-pre-processors)
109-
- [Vue CLI](https://cli.vuejs.org](css.html#pre-processors)
110-
- [webpack + vue-loader](https://vue-loader.vuejs.org](pre-processors.html#using-pre-processors)
108+
- [Vite](https://vitejs.dev/guide/features.html#css-pre-processors)
109+
- [Vue CLI](https://cli.vuejs.org/guide/css.html#pre-processors)
110+
- [webpack + vue-loader](https://vue-loader.vuejs.org/guide/pre-processors.html#using-pre-processors)
111111

112112
## Src Imports
113113

src/guide/essentials/component-basics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ That's all you need to know about props for now, but once you've finished readin
303303

304304
## Listening to Events
305305

306-
As we develop our `<BlogPost>` component, some features may require communicating back up to the parent. For example, we may decide to include an accessibility feature to enlarge the text of blog posts, while leaving the rest of the page its default size.
306+
As we develop our `<BlogPost>` component, some features may require communicating back up to the parent. For example, we may decide to include an accessibility feature to enlarge the text of blog posts, while leaving the rest of the page at its default size.
307307

308308
In the parent, we can support this feature by adding a `postFontSize` <span class="options-api">data property</span><span class="composition-api">ref</span>:
309309

@@ -558,7 +558,7 @@ HTML tags and attribute names are case-insensitive, so browsers will interpret a
558558
// camelCase in JavaScript
559559
const BlogPost = {
560560
props: ['postTitle'],
561-
emits: ['updatePost']
561+
emits: ['updatePost'],
562562
template: `
563563
<h3>{{ postTitle }}</h3>
564564
`

src/guide/essentials/event-handling.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Sometimes we also need to access the original DOM event in an inline handler. Yo
194194

195195
```js
196196
function warn(message, event) {
197-
// `now we have access to the native event`
197+
// now we have access to the native event
198198
if (event) {
199199
event.preventDefault()
200200
}
@@ -251,7 +251,7 @@ To address this problem, Vue provides **event modifiers** for `v-on`. Recall tha
251251
```
252252

253253
::: tip
254-
Order matters when using modifiers because the relevant code is generated in the same order. Therefore using `@click.prevent.self` will prevent **all clicks** while `@click.self.prevent` will only prevent clicks on the element itself.
254+
Order matters when using modifiers because the relevant code is generated in the same order. Therefore using `@click.prevent.self` will prevent **clicks default action on the element itself and its children** while `@click.self.prevent` will only prevent clicks default action on the element itself.
255255
:::
256256

257257
The `.capture`, `.once`, and `.passive` modifiers mirror the [options of the native `addEventListener` method](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Parameters):
@@ -331,7 +331,7 @@ For example:
331331
```
332332

333333
::: tip
334-
Note that modifier keys are different from regular keys and when used with `keyup` events, they have to be pressed when the event is emitted. In other words, `keyup.ctrl` will only trigger if you release a key while holding down `ctrl`. It won't trigger if you release the `ctrl` key alone
334+
Note that modifier keys are different from regular keys and when used with `keyup` events, they have to be pressed when the event is emitted. In other words, `keyup.ctrl` will only trigger if you release a key while holding down `ctrl`. It won't trigger if you release the `ctrl` key alone.
335335
:::
336336

337337
### `.exact` Modifier

src/guide/essentials/lifecycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ setTimeout(() => {
5151
}, 100)
5252
```
5353

54-
Do note this doesn't mean that the call must be placed lexically inside `setup()` or `<script setup>` - `onMounted()` can be called in an external function as long as the call stack is synchronous and originates from within `setup()`.
54+
Do note this doesn't mean that the call must be placed lexically inside `setup()` or `<script setup>`. `onMounted()` can be called in an external function as long as the call stack is synchronous and originates from within `setup()`.
5555

5656
</div>
5757

src/guide/essentials/reactivity-fundamentals.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ To wait for the DOM update to complete after a state change, you can use the [ne
224224
import { nextTick } from 'vue'
225225

226226
function increment() {
227-
count.value++
227+
state.count++
228228
nextTick(() => {
229229
// access updated DOM
230230
})
@@ -352,7 +352,7 @@ The `reactive()` API has two limitations:
352352
state = reactive({ count: 1 })
353353
```
354354

355-
It also means that when we assign or destructure a reactive object's property into local variables, or when we pass that property into a function, or destructure properties from a reactive object, we will lose the reactivity connection:
355+
It also means that when we assign or destructure a reactive object's property into local variables, or when we pass that property into a function, we will lose the reactivity connection:
356356

357357
```js
358358
const state = reactive({ count: 0 })

src/guide/essentials/template-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ It is also possible to use a JavaScript expression in a directive argument by wr
207207
```vue-html
208208
<!--
209209
Note that there are some constraints to the argument expression,
210-
as explained in the "Dynamic Argument Expression Constraints" section below.
210+
as explained in the "Dynamic Argument Value Constraints" and "Dynamic Argument Syntax Constraints" sections below.
211211
-->
212212
<a v-bind:[attributeName]="url"> ... </a>
213213

src/guide/extras/web-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ document.body.appendChild(
151151

152152
#### Events
153153

154-
Events emitted via `this.$emit` or setup `emit` are dispatched as native [CustomEvents](https://developer.mozilla.org/en-US/docs/Web/Events/Creating_and_triggering_events#adding_custom_data_%E2%80%93_customevent) on the custom element. Additional event arguments (payload) will be exposed as an array on the CustomEvent object as its `details` property.
154+
Events emitted via `this.$emit` or setup `emit` are dispatched as native [CustomEvents](https://developer.mozilla.org/en-US/docs/Web/Events/Creating_and_triggering_events#adding_custom_data_%E2%80%93_customevent) on the custom element. Additional event arguments (payload) will be exposed as an array on the CustomEvent object as its `detail` property.
155155

156156
#### Slots
157157

src/guide/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Vue is a framework and ecosystem that covers most of the common features needed
8282
- Embedding as Web Components on any page
8383
- Single-Page Application (SPA)
8484
- Fullstack / Server-Side-Rendering (SSR)
85-
- JAMStack / Static-Site-Generation (SSG)
85+
- Jamstack / Static-Site-Generation (SSG)
8686
- Targeting desktop, mobile, WebGL or even the terminal
8787

8888
If you find these concepts intimidating, don't worry! The tutorial and guide only require basic HTML and JavaScript knowledge, and you should be able to follow along without being an expert in any of these.

src/guide/reusability/custom-directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Custom directives should only be used when the desired functionality can only be
108108
A directive definition object can provide several hook functions (all optional):
109109

110110
```js
111-
const myDir = {
111+
const myDirective = {
112112
// called before bound element's attributes
113113
// or event listeners are applied
114114
created(el, binding, vnode, prevVnode) {

src/guide/scaling-up/ssr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ import { createSSRApp } from 'vue'
163163
export function createApp() {
164164
return createSSRApp({
165165
data: () => ({ count: 1 }),
166-
template: `<div @click="count++">{{ count }}</div>`
166+
template: `<button @click="count++">{{ count }}</button>`
167167
})
168168
}
169169
```

src/sponsor/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ You can also try to convince your employer to sponsor Vue as a business. This ma
4646
- **Gold (USD$500/mo)**:
4747
- Large logo placement on the front page of [vuejs.org](/).
4848
- Large Logo placement in the README of `vuejs/core` and `vuejs/vue`.
49-
- **Silver (USD$500/mo)**:
49+
- **Silver (USD$250/mo)**:
5050
- Medium logo placement in the `BACKERS.md` file of `vuejs/core` and `vuejs/vue`.
51-
- **Bronze (USD$500/mo)**:
51+
- **Bronze (USD$100/mo)**:
5252
- Small logo placement in the `BACKERS.md` file of `vuejs/core` and `vuejs/vue`.
5353
- **Generous Backer (USD$50/mo)**:
5454
- Name listed in the `BACKERS.md` file of `vuejs/core` and `vuejs/vue`, above other individual backers.

src/tutorial/src/step-8/_hint/App/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</form>
55
<ul>
66
<li v-for="todo in filteredTodos" :key="todo.id">
7-
<input type="checkbox" v-model="todo.done" />
7+
<input type="checkbox" v-model="todo.done">
88
<span :class="{ done: todo.done }">{{ todo.text }}</span>
99
<button @click="removeTodo(todo)">X</button>
1010
</li>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Let's keep building on top of the todo list from the last step. Here, we've alre
44

55
```vue-html{2}
66
<li v-for="todo in todos">
7-
<input type="checkbox" v-model="todo.done" />
7+
<input type="checkbox" v-model="todo.done">
88
...
99
</li>
1010
```

0 commit comments

Comments
 (0)