Skip to content

Commit

Permalink
docs: translate faq in french
Browse files Browse the repository at this point in the history
  • Loading branch information
cexbrayat committed May 20, 2023
1 parent b117708 commit 483f22e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/fr/.vitepress/locale-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const frLocaleConfig: DefaultTheme.LocaleConfig & Omit<DefaultTheme.Config, "loc
nav: [
{ text: 'Guide', link: '/fr/guide/' },
{ text: 'API', link: '/fr/api/' },
{
text: 'FAQ',
link: '/fr/guide/faq/'
},
{ text: 'Migrer depuis Vue 2', link: '/fr/migration/' },
{
text: 'Journal de modifications',
Expand Down Expand Up @@ -86,6 +90,10 @@ const frLocaleConfig: DefaultTheme.LocaleConfig & Omit<DefaultTheme.Config, "loc
}
]
},
{
text: 'FAQ',
link: '/fr/guide/faq/'
},
{
text: 'Migrer depuis Vue 2',
link: '/fr/migration/'
Expand Down
25 changes: 25 additions & 0 deletions docs/fr/guide/faq/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# FAQ

[[toc]]

## Vue warn: Failed setting prop

```
[Vue warn]: Failed setting prop "prefix" on <component-stub>: value foo is invalid.
TypeError: Cannot set property prefix of #<Element> which has only a getter
```

Cet avertissement est affiché si vous utilisez `shallowMount` ou `stubs` avec une propriété dont le nom est celui de l'une des propriétés de [`Element`](https://developer.mozilla.org/fr-FR/docs/Web/API/Element).

Parmi les noms de propriétés courants partagés avec `Element` figurent&nbsp;:
* `attributes`
* `children`
* `prefix`

Voir https://developer.mozilla.org/en-US/docs/Web/API/Element

**Solutions possibles**

1. Utilisez `mount` au lieu de `shallowMount` pour rendre le composant sans utiliser de `stubs`
2. Ignorez l'avertissement en utilisant un mock pour `console.warn`
3. Renommez la propriété du composant pour éviter les conflits avec les propriétés de `Element`

0 comments on commit 483f22e

Please sign in to comment.