Skip to content

Commit 6aa8226

Browse files
authored
docs(api): fix typo in attachTo anchor tag within isVisible (#2351)
Also adds the warning about `attachTo` to the French docs of isVisible and changes the example usage to comply with the warning.
1 parent fb6adab commit 6aa8226

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

docs/api/index.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ isVisible(): boolean
14361436
**Details:**
14371437
14381438
::: warning
1439-
`isVisible()` only works correctly if the wrapper is attached to the DOM using [`attachTo`](#attachto)
1439+
`isVisible()` only works correctly if the wrapper is attached to the DOM using [`attachTo`](#attachTo)
14401440
:::
14411441
14421442
```js
@@ -1445,9 +1445,11 @@ const Component = {
14451445
}
14461446

14471447
test('isVisible', () => {
1448-
const wrapper = mount(Component)
1448+
const wrapper = mount(Component, {
1449+
attachTo: document.body
1450+
});
14491451

1450-
expect(wrapper.find('span').isVisible()).toBe(false)
1452+
expect(wrapper.find('span').isVisible()).toBe(false);
14511453
})
14521454
```
14531455

docs/fr/api/index.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1429,13 +1429,19 @@ isVisible(): boolean
14291429

14301430
**Utilisation :**
14311431

1432+
::: warning
1433+
`isVisible()` ne fonctionne correctement que si le wrapper est attaché au DOM en utilisant [`attachTo`](#attachTo)
1434+
:::
1435+
14321436
```js
14331437
const Component = {
14341438
template: `<div v-show="false"><span /></div>`,
14351439
};
14361440
14371441
test('isVisible', () => {
1438-
const wrapper = mount(Component);
1442+
const wrapper = mount(Component, {
1443+
attachTo: document.body
1444+
});
14391445
14401446
expect(wrapper.find('span').isVisible()).toBe(false);
14411447
});

0 commit comments

Comments
 (0)