From cecf8eb75c4976a240025d0ecaeb47dd6be3b6ce Mon Sep 17 00:00:00 2001 From: 38elements Date: Sun, 1 Apr 2018 21:46:35 +0900 Subject: [PATCH 01/22] feat: add scoped slots option --- docs/en/README.md | 1 + docs/en/SUMMARY.md | 1 + docs/en/api/README.md | 1 + docs/en/api/options.md | 23 +++++++++++ flow/options.flow.js | 1 + packages/create-instance/add-scoped-slots.js | 14 +++++++ packages/create-instance/create-instance.js | 33 +++++++++++++++- .../component-with-scoped-slots.vue | 30 +++++++++++++++ test/specs/mounting-options/scopedSlots.js | 38 +++++++++++++++++++ 9 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 packages/create-instance/add-scoped-slots.js create mode 100644 test/resources/components/component-with-scoped-slots.vue create mode 100644 test/specs/mounting-options/scopedSlots.js diff --git a/docs/en/README.md b/docs/en/README.md index 17be425d7..3ab665ced 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -23,6 +23,7 @@ Vue Test Utils is the official unit testing utility library for Vue.js. * [Mounting Options](api/options.md) - [context](api/options.md#context) - [slots](api/options.md#slots) + - [scopedSlots](api/options.md#scopedslots) - [stubs](api/options.md#stubs) - [mocks](api/options.md#mocks) - [localVue](api/options.md#localvue) diff --git a/docs/en/SUMMARY.md b/docs/en/SUMMARY.md index f743a46a2..99f0a09c9 100644 --- a/docs/en/SUMMARY.md +++ b/docs/en/SUMMARY.md @@ -19,6 +19,7 @@ * [Mounting Options](api/options.md) - [context](api/options.md#context) - [slots](api/options.md#slots) + - [scopedSlots](api/options.md#scopedslots) - [stubs](api/options.md#stubs) - [mocks](api/options.md#mocks) - [localVue](api/options.md#localvue) diff --git a/docs/en/api/README.md b/docs/en/api/README.md index 879f38c01..ed8fe907c 100644 --- a/docs/en/api/README.md +++ b/docs/en/api/README.md @@ -7,6 +7,7 @@ * [Mounting Options](./options.md) - [context](./options.md#context) - [slots](./options.md#slots) + - [scopedSlots](./options.md#scopedslots) - [stubs](./options.md#stubs) - [mocks](./options.md#mocks) - [localVue](./options.md#localvue) diff --git a/docs/en/api/options.md b/docs/en/api/options.md index 20e57e1ec..c7b5ce58e 100644 --- a/docs/en/api/options.md +++ b/docs/en/api/options.md @@ -6,6 +6,7 @@ Options for `mount` and `shallow`. The options object can contain both Vue Test - [`context`](#context) - [`slots`](#slots) +- [`scopedSlots`](#scopedslots) - [`stubs`](#stubs) - [`mocks`](#mocks) - [`localVue`](#localvue) @@ -68,6 +69,28 @@ There is a limitation to this. This does not support PhantomJS. Please use [Puppeteer](https://github.com/karma-runner/karma-chrome-launcher#headless-chromium-with-puppeteer). +### `scopedSlots` + +- type: `{ [name: string]: string }` + +Provide an object of scoped slots contents to the component. The key corresponds to the slot name. The value can be a template string. +There is two limitations. + +* This supports vue@2.5+. + +* You can not set a `template` tag to top of `scopedSlots` option. + +Example: + +```js +const wrapper = shallow(Component, { + scopedSlots: { + bar: '

{{props.index}},{{props.text}}

' + } +}) +expect(wrapper.html()).toBe('

0,text1

1,text2

2,text3

') +``` + ### `stubs` - type: `{ [name: string]: Component | boolean } | Array` diff --git a/flow/options.flow.js b/flow/options.flow.js index ed3b973fe..2278e684e 100644 --- a/flow/options.flow.js +++ b/flow/options.flow.js @@ -2,6 +2,7 @@ declare type Options = { // eslint-disable-line no-undef attachToDocument?: boolean, mocks?: Object, slots?: Object, + scopedSlots?: Object, localVue?: Component, provide?: Object, stubs?: Object, diff --git a/packages/create-instance/add-scoped-slots.js b/packages/create-instance/add-scoped-slots.js new file mode 100644 index 000000000..6d2bc052f --- /dev/null +++ b/packages/create-instance/add-scoped-slots.js @@ -0,0 +1,14 @@ +// @flow + +import { compileToFunctions } from 'vue-template-compiler' +import { throwError } from 'shared/util' + +export function addScopedSlots (vm: Component, scopedSlots: Object): void { + Object.keys(scopedSlots).forEach((key) => { + const template = scopedSlots[key].trim() + if (template.substr(0, 9) === '= 2.5) { + vm.$_VueTestUtils_scopedSlots = {} + const renderSlot = vm._renderProxy._t + vm._renderProxy._t = function (name, feedback, props, bindObject) { + const scopedSlotFn = vm.$_VueTestUtils_scopedSlots[name] + if (scopedSlotFn) { + props = extend(extend({}, bindObject), props) + vm._renderProxy.props = props + return scopedSlotFn.call(vm._renderProxy) + } else { + return renderSlot(name, feedback, props, bindObject) + } + } + // $FlowIgnore + addScopedSlots(vm, options.scopedSlots) + } else { + throwError('scopedSlots option supports vue@2.5+.') + } + } + if (options.slots) { addSlots(vm, options.slots) } diff --git a/test/resources/components/component-with-scoped-slots.vue b/test/resources/components/component-with-scoped-slots.vue new file mode 100644 index 000000000..630add6d4 --- /dev/null +++ b/test/resources/components/component-with-scoped-slots.vue @@ -0,0 +1,30 @@ + + + diff --git a/test/specs/mounting-options/scopedSlots.js b/test/specs/mounting-options/scopedSlots.js new file mode 100644 index 000000000..4d18b59f0 --- /dev/null +++ b/test/specs/mounting-options/scopedSlots.js @@ -0,0 +1,38 @@ +import { describeWithShallowAndMount, vueVersion } from '~resources/utils' +import ComponentWithScopedSlots from '~resources/components/component-with-scoped-slots.vue' + +describeWithShallowAndMount('scopedSlots', (mountingMethod) => { + if (vueVersion >= 2.5) { + it('mounts component scoped slots', () => { + const wrapper = mountingMethod(ComponentWithScopedSlots, { + scopedSlots: { + 'item': '

{{props.index}},{{props.text}}

' + } + }) + expect(wrapper.html()).to.equal('

0,text1

1,text2

2,text3

') + }) + it('throws exception when it is seted to template tag at top', () => { + const fn = () => { + mountingMethod(ComponentWithScopedSlots, { + scopedSlots: { + 'item': '' + } + }) + } + const message = '[vue-test-utils]: scopedSlots option does not support template tag.' + expect(fn).to.throw().with.property('message', message) + }) + } else { + it('throws exception when vue version < 2.5', () => { + const fn = () => { + mountingMethod(ComponentWithScopedSlots, { + scopedSlots: { + 'item': '

{{props.index}},{{props.text}}

' + } + }) + } + const message = '[vue-test-utils]: scopedSlots option supports vue@2.5+.' + expect(fn).to.throw().with.property('message', message) + }) + } +}) From e7da1f749573f53eef25b3ffc34d4ba46c5007ac Mon Sep 17 00:00:00 2001 From: 38elements Date: Tue, 3 Apr 2018 19:12:56 +0900 Subject: [PATCH 02/22] add scopedSlots to index.d.ts --- packages/test-utils/types/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/test-utils/types/index.d.ts b/packages/test-utils/types/index.d.ts index 30a39d701..1bc7cf1eb 100644 --- a/packages/test-utils/types/index.d.ts +++ b/packages/test-utils/types/index.d.ts @@ -113,6 +113,7 @@ interface MountOptions extends ComponentOptions { localVue?: typeof Vue mocks?: object slots?: Slots + scopedSlots?: string stubs?: Stubs, attrs?: object listeners?: object From 37c595036521e0e3c79d909a7b7e5582ca37a08e Mon Sep 17 00:00:00 2001 From: 38elements Date: Wed, 4 Apr 2018 19:24:27 +0900 Subject: [PATCH 03/22] add test --- packages/create-instance/create-instance.js | 2 +- .../components/component-with-scoped-slots.vue | 12 +----------- test/specs/mounting-options/scopedSlots.js | 4 +++- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/packages/create-instance/create-instance.js b/packages/create-instance/create-instance.js index cb7c21529..a972fc0d3 100644 --- a/packages/create-instance/create-instance.js +++ b/packages/create-instance/create-instance.js @@ -1,5 +1,5 @@ // @flow -// + import Vue from 'vue' import { addSlots } from './add-slots' import { addScopedSlots } from './add-scoped-slots' diff --git a/test/resources/components/component-with-scoped-slots.vue b/test/resources/components/component-with-scoped-slots.vue index 630add6d4..a020a907b 100644 --- a/test/resources/components/component-with-scoped-slots.vue +++ b/test/resources/components/component-with-scoped-slots.vue @@ -13,17 +13,7 @@ name: 'component-with-scoped-slots', data () { return { - items: [ - { - text: 'text1' - }, - { - text: 'text2' - }, - { - text: 'text3' - } - ] + items: [{ text: 'a1' }, { text: 'a2' }, { text: 'a3' }] } } } diff --git a/test/specs/mounting-options/scopedSlots.js b/test/specs/mounting-options/scopedSlots.js index 4d18b59f0..039925546 100644 --- a/test/specs/mounting-options/scopedSlots.js +++ b/test/specs/mounting-options/scopedSlots.js @@ -9,7 +9,9 @@ describeWithShallowAndMount('scopedSlots', (mountingMethod) => { 'item': '

{{props.index}},{{props.text}}

' } }) - expect(wrapper.html()).to.equal('

0,text1

1,text2

2,text3

') + expect(wrapper.html()).to.equal('

0,a1

1,a2

2,a3

') + wrapper.vm.items = [{ text: 'b1' }, { text: 'b2' }, { text: 'b3' }] + expect(wrapper.html()).to.equal('

0,b1

1,b2

2,b3

') }) it('throws exception when it is seted to template tag at top', () => { const fn = () => { From 3c841a17ec5bc4ed0fc991ea53df1e81fbfddb5c Mon Sep 17 00:00:00 2001 From: 38elements Date: Thu, 5 Apr 2018 08:22:28 +0900 Subject: [PATCH 04/22] use Object.assign() --- packages/create-instance/create-instance.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/create-instance/create-instance.js b/packages/create-instance/create-instance.js index a972fc0d3..45c040a40 100644 --- a/packages/create-instance/create-instance.js +++ b/packages/create-instance/create-instance.js @@ -15,13 +15,6 @@ import deleteoptions from './delete-mounting-options' import createFunctionalComponent from './create-functional-component' import { componentNeedsCompiling } from 'shared/validators' -function extend (to: Object, _from: ?Object): Object { - for (const key in _from) { - to[key] = _from[key] - } - return to -} - export default function createInstance ( component: Component, options: Options, @@ -74,7 +67,7 @@ export default function createInstance ( vm._renderProxy._t = function (name, feedback, props, bindObject) { const scopedSlotFn = vm.$_VueTestUtils_scopedSlots[name] if (scopedSlotFn) { - props = extend(extend({}, bindObject), props) + props = Object.assign(Object.assign({}, bindObject), props) vm._renderProxy.props = props return scopedSlotFn.call(vm._renderProxy) } else { From ea2d16f3b32be74a5b33b97f9d92a21a077981fa Mon Sep 17 00:00:00 2001 From: 38elements Date: Thu, 5 Apr 2018 08:41:29 +0900 Subject: [PATCH 05/22] fix types --- packages/test-utils/types/index.d.ts | 2 +- packages/test-utils/types/test/mount.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/test-utils/types/index.d.ts b/packages/test-utils/types/index.d.ts index 1bc7cf1eb..46397af57 100644 --- a/packages/test-utils/types/index.d.ts +++ b/packages/test-utils/types/index.d.ts @@ -113,7 +113,7 @@ interface MountOptions extends ComponentOptions { localVue?: typeof Vue mocks?: object slots?: Slots - scopedSlots?: string + scopedSlots?: object stubs?: Stubs, attrs?: object listeners?: object diff --git a/packages/test-utils/types/test/mount.ts b/packages/test-utils/types/test/mount.ts index 6821c5b03..b7c36593b 100644 --- a/packages/test-utils/types/test/mount.ts +++ b/packages/test-utils/types/test/mount.ts @@ -33,6 +33,9 @@ mount(ClassComponent, { foo: [normalOptions, functionalOptions], bar: ClassComponent }, + scopedSlots: { + baz: `
Baz
` + }, stubs: { foo: normalOptions, bar: functionalOptions, From 8f3239f1c10fc38c9a503d3c0368d35a63da1033 Mon Sep 17 00:00:00 2001 From: 38elements Date: Thu, 5 Apr 2018 09:05:18 +0900 Subject: [PATCH 06/22] change test --- test/specs/mounting-options/scopedSlots.js | 27 +++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/test/specs/mounting-options/scopedSlots.js b/test/specs/mounting-options/scopedSlots.js index 039925546..3b4ba4502 100644 --- a/test/specs/mounting-options/scopedSlots.js +++ b/test/specs/mounting-options/scopedSlots.js @@ -1,19 +1,22 @@ -import { describeWithShallowAndMount, vueVersion } from '~resources/utils' +import { describeWithShallowAndMount, vueVersion, itDoNotRunIf } from '~resources/utils' import ComponentWithScopedSlots from '~resources/components/component-with-scoped-slots.vue' describeWithShallowAndMount('scopedSlots', (mountingMethod) => { - if (vueVersion >= 2.5) { - it('mounts component scoped slots', () => { + itDoNotRunIf(vueVersion < 2.5, + 'mounts component scoped slots', () => { const wrapper = mountingMethod(ComponentWithScopedSlots, { scopedSlots: { - 'item': '

{{props.index}},{{props.text}}

' + 'item': '

{{props.index}},{{props.text}}

' } }) expect(wrapper.html()).to.equal('

0,a1

1,a2

2,a3

') wrapper.vm.items = [{ text: 'b1' }, { text: 'b2' }, { text: 'b3' }] expect(wrapper.html()).to.equal('

0,b1

1,b2

2,b3

') - }) - it('throws exception when it is seted to template tag at top', () => { + } + ) + + itDoNotRunIf(vueVersion < 2.5, + 'throws exception when it is seted to template tag at top', () => { const fn = () => { mountingMethod(ComponentWithScopedSlots, { scopedSlots: { @@ -23,9 +26,11 @@ describeWithShallowAndMount('scopedSlots', (mountingMethod) => { } const message = '[vue-test-utils]: scopedSlots option does not support template tag.' expect(fn).to.throw().with.property('message', message) - }) - } else { - it('throws exception when vue version < 2.5', () => { + } + ) + + itDoNotRunIf(vueVersion >= 2.5, + 'throws exception when vue version < 2.5', () => { const fn = () => { mountingMethod(ComponentWithScopedSlots, { scopedSlots: { @@ -35,6 +40,6 @@ describeWithShallowAndMount('scopedSlots', (mountingMethod) => { } const message = '[vue-test-utils]: scopedSlots option supports vue@2.5+.' expect(fn).to.throw().with.property('message', message) - }) - } + } + ) }) From d4e7bdf1f4ea26e34d48fcff8af17f6fe94eb973 Mon Sep 17 00:00:00 2001 From: 38elements Date: Thu, 5 Apr 2018 09:14:43 +0900 Subject: [PATCH 07/22] fix document --- docs/en/api/options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/api/options.md b/docs/en/api/options.md index c7b5ce58e..0ffd9b71f 100644 --- a/docs/en/api/options.md +++ b/docs/en/api/options.md @@ -85,7 +85,7 @@ Example: ```js const wrapper = shallow(Component, { scopedSlots: { - bar: '

{{props.index}},{{props.text}}

' + bar: '

{{props.index}},{{props.text}}

' } }) expect(wrapper.html()).toBe('

0,text1

1,text2

2,text3

') From e6ad08d171db015e560001860848b7178e042d53 Mon Sep 17 00:00:00 2001 From: 38elements Date: Thu, 5 Apr 2018 09:33:21 +0900 Subject: [PATCH 08/22] refactor --- packages/create-instance/create-instance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-instance/create-instance.js b/packages/create-instance/create-instance.js index 45c040a40..3e33d1453 100644 --- a/packages/create-instance/create-instance.js +++ b/packages/create-instance/create-instance.js @@ -67,7 +67,7 @@ export default function createInstance ( vm._renderProxy._t = function (name, feedback, props, bindObject) { const scopedSlotFn = vm.$_VueTestUtils_scopedSlots[name] if (scopedSlotFn) { - props = Object.assign(Object.assign({}, bindObject), props) + props = Object.assign({}, bindObject, props) vm._renderProxy.props = props return scopedSlotFn.call(vm._renderProxy) } else { From 8da1a4e521b90bcf28d60ef03580ca35f5950820 Mon Sep 17 00:00:00 2001 From: 38elements Date: Thu, 5 Apr 2018 10:57:29 +0900 Subject: [PATCH 09/22] add test for slots --- packages/create-instance/create-instance.js | 2 +- .../components/component-with-scoped-slots.vue | 15 ++++++++++----- test/specs/mounting-options/scopedSlots.js | 6 ++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/packages/create-instance/create-instance.js b/packages/create-instance/create-instance.js index 3e33d1453..750878c28 100644 --- a/packages/create-instance/create-instance.js +++ b/packages/create-instance/create-instance.js @@ -71,7 +71,7 @@ export default function createInstance ( vm._renderProxy.props = props return scopedSlotFn.call(vm._renderProxy) } else { - return renderSlot(name, feedback, props, bindObject) + return renderSlot.call(vm._renderProxy, name, feedback, props, bindObject) } } // $FlowIgnore diff --git a/test/resources/components/component-with-scoped-slots.vue b/test/resources/components/component-with-scoped-slots.vue index a020a907b..d15e75342 100644 --- a/test/resources/components/component-with-scoped-slots.vue +++ b/test/resources/components/component-with-scoped-slots.vue @@ -1,10 +1,15 @@ diff --git a/test/specs/mounting-options/scopedSlots.js b/test/specs/mounting-options/scopedSlots.js index 3b4ba4502..79541a3c0 100644 --- a/test/specs/mounting-options/scopedSlots.js +++ b/test/specs/mounting-options/scopedSlots.js @@ -5,13 +5,15 @@ describeWithShallowAndMount('scopedSlots', (mountingMethod) => { itDoNotRunIf(vueVersion < 2.5, 'mounts component scoped slots', () => { const wrapper = mountingMethod(ComponentWithScopedSlots, { + slots: { default: '123' }, scopedSlots: { 'item': '

{{props.index}},{{props.text}}

' } }) - expect(wrapper.html()).to.equal('

0,a1

1,a2

2,a3

') + expect(wrapper.find('#slots').html()).to.equal('
123
') + expect(wrapper.find('#scopedSlots').html()).to.equal('

0,a1

1,a2

2,a3

') wrapper.vm.items = [{ text: 'b1' }, { text: 'b2' }, { text: 'b3' }] - expect(wrapper.html()).to.equal('

0,b1

1,b2

2,b3

') + expect(wrapper.find('#scopedSlots').html()).to.equal('

0,b1

1,b2

2,b3

') } ) From 7665971c15dcd1b46592500a409a497af9ded628 Mon Sep 17 00:00:00 2001 From: 38elements Date: Thu, 5 Apr 2018 11:14:04 +0900 Subject: [PATCH 10/22] refactor --- packages/create-instance/add-scoped-slots.js | 2 +- packages/create-instance/create-instance.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/create-instance/add-scoped-slots.js b/packages/create-instance/add-scoped-slots.js index 6d2bc052f..558afbafe 100644 --- a/packages/create-instance/add-scoped-slots.js +++ b/packages/create-instance/add-scoped-slots.js @@ -9,6 +9,6 @@ export function addScopedSlots (vm: Component, scopedSlots: Object): void { if (template.substr(0, 9) === '= 2.5) { - vm.$_VueTestUtils_scopedSlots = {} + vm.$_vueTestUtils_scopedSlots = {} const renderSlot = vm._renderProxy._t vm._renderProxy._t = function (name, feedback, props, bindObject) { - const scopedSlotFn = vm.$_VueTestUtils_scopedSlots[name] + const scopedSlotFn = vm.$_vueTestUtils_scopedSlots[name] if (scopedSlotFn) { props = Object.assign({}, bindObject, props) vm._renderProxy.props = props From 09531712641c38580bbecbff1a13fbb0408403ca Mon Sep 17 00:00:00 2001 From: 38elements Date: Thu, 5 Apr 2018 12:20:16 +0900 Subject: [PATCH 11/22] improve types --- packages/test-utils/types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/test-utils/types/index.d.ts b/packages/test-utils/types/index.d.ts index 46397af57..a0b73022a 100644 --- a/packages/test-utils/types/index.d.ts +++ b/packages/test-utils/types/index.d.ts @@ -113,7 +113,7 @@ interface MountOptions extends ComponentOptions { localVue?: typeof Vue mocks?: object slots?: Slots - scopedSlots?: object + scopedSlots?: Record stubs?: Stubs, attrs?: object listeners?: object From f737344908912b0c50d75397aa72ecb7da2a4a5a Mon Sep 17 00:00:00 2001 From: 38elements Date: Thu, 5 Apr 2018 17:15:49 +0900 Subject: [PATCH 12/22] use spread syntax --- packages/create-instance/create-instance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-instance/create-instance.js b/packages/create-instance/create-instance.js index 533268055..c27b76a2f 100644 --- a/packages/create-instance/create-instance.js +++ b/packages/create-instance/create-instance.js @@ -67,7 +67,7 @@ export default function createInstance ( vm._renderProxy._t = function (name, feedback, props, bindObject) { const scopedSlotFn = vm.$_vueTestUtils_scopedSlots[name] if (scopedSlotFn) { - props = Object.assign({}, bindObject, props) + props = { ...bindObject, ...props } vm._renderProxy.props = props return scopedSlotFn.call(vm._renderProxy) } else { From d925dcfec0d1149a6638b7f96abaa9c3b82fec3a Mon Sep 17 00:00:00 2001 From: 38elements <38elements@users.noreply.github.com> Date: Fri, 6 Apr 2018 00:13:34 +0900 Subject: [PATCH 13/22] Update options.md --- docs/en/api/options.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/en/api/options.md b/docs/en/api/options.md index 0ffd9b71f..e6f623764 100644 --- a/docs/en/api/options.md +++ b/docs/en/api/options.md @@ -73,7 +73,8 @@ Please use [Puppeteer](https://github.com/karma-runner/karma-chrome-launcher#hea - type: `{ [name: string]: string }` -Provide an object of scoped slots contents to the component. The key corresponds to the slot name. The value can be a template string. +Provide an object of scoped slots contents to the component. The key corresponds to the slot name. The value can be a template string. + There is two limitations. * This supports vue@2.5+. @@ -85,10 +86,10 @@ Example: ```js const wrapper = shallow(Component, { scopedSlots: { - bar: '

{{props.index}},{{props.text}}

' + foo: '

{{props.index}},{{props.text}}

' } }) -expect(wrapper.html()).toBe('

0,text1

1,text2

2,text3

') +expect(wrapper.find('#fooWrapper').html()).toBe('

0,text1

1,text2

2,text3

') ``` ### `stubs` From 58399c50fbf84e1654334ad1b66965128e7ca437 Mon Sep 17 00:00:00 2001 From: 38elements <38elements@users.noreply.github.com> Date: Sat, 7 Apr 2018 10:51:01 +0900 Subject: [PATCH 14/22] Update options.md --- docs/en/api/options.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/api/options.md b/docs/en/api/options.md index e6f623764..d434da8af 100644 --- a/docs/en/api/options.md +++ b/docs/en/api/options.md @@ -75,11 +75,11 @@ Please use [Puppeteer](https://github.com/karma-runner/karma-chrome-launcher#hea Provide an object of scoped slots contents to the component. The key corresponds to the slot name. The value can be a template string. -There is two limitations. +There are two limitations. -* This supports vue@2.5+. +* This option is only supported in vue@2.5+. -* You can not set a `template` tag to top of `scopedSlots` option. +* You can not use `