From 2af973782fc9bb572b95208c6f4474af8ee8877b Mon Sep 17 00:00:00 2001 From: 38elements Date: Mon, 23 Jul 2018 22:28:52 +0900 Subject: [PATCH] docs: update slots section in options.md --- docs/api/options.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/api/options.md b/docs/api/options.md index 5f462949f..1707e78fb 100644 --- a/docs/api/options.md +++ b/docs/api/options.md @@ -47,16 +47,23 @@ Example: ```js import Foo from './Foo.vue' -import Bar from './Bar.vue' + +const bazComponent = { + name: 'baz-component', + template: '

baz

' +} const wrapper = shallowMount(Component, { slots: { - default: [Foo, Bar], + default: [Foo, '', 'text'], fooBar: Foo, // Will match ``. foo: '
', - bar: 'bar' + bar: 'bar', + baz: bazComponent, + qux: '' } }) + expect(wrapper.find('div')).toBe(true) ```