Skip to content

Commit af97497

Browse files
committed
docs: fix passing data test example
1 parent 21e57ae commit af97497

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/fr/guide/essentials/passing-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Nous voulons réutiliser ce composant dans tous nos projets, chacun ayant des ex
3030

3131
Nous allons afficher une erreur si `password` est inférieur à `minLength`. Nous pouvons le faire en créant une `computed` nommée `error` et en la rendant de manière conditionnelle à l'aide de `v-if` :
3232

33-
```js
33+
```vue
3434
<!-- Password.vue -->
3535
<script setup>
3636
import { ref, computed } from 'vue'
@@ -44,7 +44,7 @@ const error = computed(() => {
4444
}
4545
return
4646
})
47-
<script>
47+
</script>
4848
4949
<template>
5050
<div>

docs/guide/essentials/passing-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const error = computed(() => {
4444
}
4545
return
4646
})
47-
<script>
47+
</script>
4848
4949
<template>
5050
<div>

docs/zh/guide/essentials/passing-data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ const password = ref('')
4040
4141
const error = computed(() => {
4242
if (password.value.length < props.minLength) {
43-
return `Password must be at least ${props.minLength} characters.`
43+
return `密码必须至少包含 ${props.minLength} 个字符。`
4444
}
4545
return
4646
})
47-
<script>
47+
</script>
4848
4949
<template>
5050
<div>
@@ -69,7 +69,7 @@ test('renders an error if length is too short', () => {
6969
}
7070
})
7171

72-
expect(wrapper.html()).toContain('密码必须至少包含 10 个字符')
72+
expect(wrapper.html()).toContain('密码必须至少包含 10 个字符')
7373
})
7474
```
7575

0 commit comments

Comments
 (0)