Skip to content

Commit

Permalink
docs #2821: fix writing mistakes in letter case (#2828)
Browse files Browse the repository at this point in the history
* docs: fix writing mistakes in letter case

* docs: revert removing 'is' from 'count is'
  • Loading branch information
xiaodong2008 committed Apr 30, 2024
1 parent 4c1e2c1 commit 7ae6897
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/api/built-in-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ Render the element and component once only, and skip future updates.
<span v-once>This will never change: {{msg}}</span>
<!-- the element have children -->
<div v-once>
<h1>comment</h1>
<h1>Comment</h1>
<p>{{msg}}</p>
</div>
<!-- component -->
Expand Down
6 changes: 3 additions & 3 deletions src/examples/src/list-transition/App/template.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<button @click="insert">insert at random index</button>
<button @click="reset">reset</button>
<button @click="shuffle">shuffle</button>
<button @click="insert">Insert at random index</button>
<button @click="reset">Reset</button>
<button @click="shuffle">Shuffle</button>

<TransitionGroup tag="ul" name="fade" class="container">
<li v-for="item in items" class="item" :key="item">
Expand Down
2 changes: 1 addition & 1 deletion src/examples/src/modal/App/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- use the modal component, pass in the prop -->
<modal :show="showModal" @close="showModal = false">
<template #header>
<h3>custom header</h3>
<h3>Custom Header</h3>
</template>
</modal>
</Teleport>
2 changes: 1 addition & 1 deletion src/examples/src/todomvc/App/template.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section class="todoapp">
<header class="header">
<h1>todos</h1>
<h1>Todos</h1>
<input
class="new-todo"
autofocus
Expand Down
2 changes: 1 addition & 1 deletion src/guide/built-ins/keep-alive-demos/CompA.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ const count = ref(0)

<template>
<p>Current component: A</p>
<span style="margin-right: 20px">count: {{ count }}</span>
<span style="margin-right: 20px">Count: {{ count }}</span>
<button @click="count++">+</button>
</template>
12 changes: 6 additions & 6 deletions src/guide/components/attrs.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ When a component renders a single root element, fallthrough attributes will be a

```vue-html
<!-- template of <MyButton> -->
<button>click me</button>
<button>Click Me</button>
```

And a parent using this component with:
Expand All @@ -26,7 +26,7 @@ And a parent using this component with:
The final rendered DOM would be:

```html
<button class="large">click me</button>
<button class="large">Click Me</button>
```

Here, `<MyButton>` did not declare `class` as an accepted prop. Therefore, `class` is treated as a fallthrough attribute and automatically added to `<MyButton>`'s root element.
Expand All @@ -37,13 +37,13 @@ If the child component's root element already has existing `class` or `style` at

```vue-html
<!-- template of <MyButton> -->
<button class="btn">click me</button>
<button class="btn">Click Me</button>
```

Then the final rendered DOM would now become:

```html
<button class="btn large">click me</button>
<button class="btn large">Click Me</button>
```

### `v-on` Listener Inheritance {#v-on-listener-inheritance}
Expand Down Expand Up @@ -112,15 +112,15 @@ Using our `<MyButton>` component example from the [previous section](#attribute-

```vue-html
<div class="btn-wrapper">
<button class="btn">click me</button>
<button class="btn">Click Me</button>
</div>
```

We want all fallthrough attributes like `class` and `v-on` listeners to be applied to the inner `<button>`, not the outer `<div>`. We can achieve this with `inheritAttrs: false` and `v-bind="$attrs"`:

```vue-html{2}
<div class="btn-wrapper">
<button class="btn" v-bind="$attrs">click me</button>
<button class="btn" v-bind="$attrs">Click Me</button>
</div>
```

Expand Down
2 changes: 1 addition & 1 deletion src/guide/components/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ A component can emit custom events directly in template expressions (e.g. in a `

```vue-html
<!-- MyComponent -->
<button @click="$emit('someEvent')">click me</button>
<button @click="$emit('someEvent')">Click Me</button>
```

<div class="options-api">
Expand Down
2 changes: 1 addition & 1 deletion src/guide/components/v-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function update() {
</script>
<template>
<div>parent bound v-model is: {{ model }}</div>
<div>Parent bound v-model is: {{ model }}</div>
</template>
```

Expand Down
4 changes: 2 additions & 2 deletions src/guide/essentials/watchers.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const obj = reactive({ count: 0 })

// this won't work because we are passing a number to watch()
watch(obj.count, (count) => {
console.log(`count is: ${count}`)
console.log(`Count is: ${count}`)
})
```

Expand All @@ -152,7 +152,7 @@ Instead, use a getter:
watch(
() => obj.count,
(count) => {
console.log(`count is: ${count}`)
console.log(`Count is: ${count}`)
}
)
```
Expand Down
2 changes: 1 addition & 1 deletion src/guide/extras/reactivity-in-depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ import { ref, watchEffect } from 'vue'
const count = ref(0)

watchEffect(() => {
document.body.innerHTML = `count is: ${count.value}`
document.body.innerHTML = `Count is: ${count.value}`
})

// updates the DOM
Expand Down
4 changes: 2 additions & 2 deletions src/guide/extras/render-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ h(
/* ... */
}
},
'click me'
'Click Me'
)
```

Expand All @@ -377,7 +377,7 @@ h(
/* ... */
}}
>
click me
Click Me
</button>
```

Expand Down
4 changes: 2 additions & 2 deletions src/guide/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export default {
data() {
return { count: 0 }
},
template: `<div>count is {{ count }}</div>`
template: `<div>Count is: {{ count }}</div>`
}
```

Expand All @@ -409,7 +409,7 @@ export default {
const count = ref(0)
return { count }
},
template: `<div>count is {{ count }}</div>`
template: `<div>Count is: {{ count }}</div>`
}
```

Expand Down
2 changes: 1 addition & 1 deletion src/tutorial/src/step-2/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Properties in the returned object will be made available in the template. This i

```vue-html
<h1>{{ message }}</h1>
<p>count is: {{ counter.count }}</p>
<p>Count is: {{ counter.count }}</p>
```

Notice how we did not need to use `.value` when accessing the `message` ref in templates: it is automatically unwrapped for more succinct usage.
Expand Down
2 changes: 1 addition & 1 deletion src/tutorial/src/step-4/App/template.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!-- make this button work -->
<button>count is: {{ count }}</button>
<button>Count is: {{ count }}</button>
2 changes: 1 addition & 1 deletion src/tutorial/src/step-4/_hint/App/template.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<button @click="increment">count is: {{ count }}</button>
<button @click="increment">Count is: {{ count }}</button>
2 changes: 1 addition & 1 deletion src/tutorial/src/step-6/App/template.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<button @click="toggle">toggle</button>
<button @click="toggle">Toggle</button>
<h1>Vue is awesome!</h1>
<h1>Oh no 😢</h1>
2 changes: 1 addition & 1 deletion src/tutorial/src/step-6/_hint/App/template.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<button @click="toggle">toggle</button>
<button @click="toggle">Toggle</button>
<h1 v-if="awesome">Vue is awesome!</h1>
<h1 v-else>Oh no 😢</h1>
2 changes: 1 addition & 1 deletion src/tutorial/src/step-9/App/template.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<p ref="pElementRef">hello</p>
<p ref="pElementRef">Hello</p>

0 comments on commit 7ae6897

Please sign in to comment.