Skip to content

Commit 540e23e

Browse files
38elementseddyerburgh
authored andcommitted
docs: update slots section in options.md (#850)
1 parent e9374b8 commit 540e23e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Diff for: docs/api/options.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,23 @@ Example:
4747

4848
```js
4949
import Foo from './Foo.vue'
50-
import Bar from './Bar.vue'
50+
51+
const bazComponent = {
52+
name: 'baz-component',
53+
template: '<p>baz</p>'
54+
}
5155

5256
const wrapper = shallowMount(Component, {
5357
slots: {
54-
default: [Foo, Bar],
58+
default: [Foo, '<my-component />', 'text'],
5559
fooBar: Foo, // Will match `<slot name="FooBar" />`.
5660
foo: '<div />',
57-
bar: 'bar'
61+
bar: 'bar',
62+
baz: bazComponent,
63+
qux: '<my-component />'
5864
}
5965
})
66+
6067
expect(wrapper.find('div')).toBe(true)
6168
```
6269

0 commit comments

Comments
 (0)