You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/options.md
+28-15
Original file line number
Diff line number
Diff line change
@@ -9,20 +9,22 @@ These options will be merged with the component's existing options when mounted
9
9
[See other options for examples](#other-options)
10
10
:::
11
11
12
-
-[`context`](#context)
13
-
-[`data`](#data)
14
-
-[`slots`](#slots)
15
-
-[`scopedSlots`](#scopedslots)
16
-
-[`stubs`](#stubs)
17
-
-[`mocks`](#mocks)
18
-
-[`localVue`](#localvue)
19
-
-[`attachTo`](#attachto)
20
-
-[`attachToDocument`](#attachtodocument)
21
-
-[`propsData`](#propsdata)
22
-
-[`attrs`](#attrs)
23
-
-[`listeners`](#listeners)
24
-
-[`parentComponent`](#parentcomponent)
25
-
-[`provide`](#provide)
12
+
-[Mounting Options](#mounting-options)
13
+
-[context](#context)
14
+
-[data](#data)
15
+
-[slots](#slots)
16
+
-[scopedSlots](#scopedslots)
17
+
-[stubs](#stubs)
18
+
-[mocks](#mocks)
19
+
-[localVue](#localvue)
20
+
-[attachTo](#attachto)
21
+
-[attachToDocument](#attachtodocument)
22
+
-[attrs](#attrs)
23
+
-[propsData](#propsdata)
24
+
-[listeners](#listeners)
25
+
-[parentComponent](#parentcomponent)
26
+
-[provide](#provide)
27
+
-[Other options](#other-options)
26
28
27
29
## context
28
30
@@ -327,7 +329,18 @@ wrapper.destroy()
327
329
- default: `false`
328
330
329
331
::: warning Deprecation warning
330
-
`attachToDocument` is deprecated and will be removed in future releases. Use [`attachTo`](#attachto) instead.
332
+
`attachToDocument` is deprecated and will be removed in future releases. Use [`attachTo`](#attachto) instead. For example, if you need to attach the component to the document.body:
333
+
334
+
```js
335
+
constelem=document.createElement('div')
336
+
if (document.body) {
337
+
document.body.appendChild(elem)
338
+
}
339
+
wrapper =mount(Component, {
340
+
attachTo: elem
341
+
})
342
+
```
343
+
331
344
:::
332
345
333
346
Like [`attachTo`](#attachto), but automatically creates a new `div` element for you and inserts it into the body.
0 commit comments