From e26b396525f832b6360dfe164b2d8636d6082c8c Mon Sep 17 00:00:00 2001 From: Daniel Small Date: Thu, 1 Aug 2019 11:55:45 +1000 Subject: [PATCH 1/2] fix: add reference to vm. --- .../create-instance/create-scoped-slots.js | 1 + .../mounting-options/scopedSlots.spec.js | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/packages/create-instance/create-scoped-slots.js b/packages/create-instance/create-scoped-slots.js index f372391d8..d5d0cecaa 100644 --- a/packages/create-instance/create-scoped-slots.js +++ b/packages/create-instance/create-scoped-slots.js @@ -36,6 +36,7 @@ function getVueTemplateCompilerHelpers( helpers[name] = vue._renderProxy[name] }) helpers.$createElement = vue._renderProxy.$createElement + helpers.$set = vue._renderProxy.$set return helpers } diff --git a/test/specs/mounting-options/scopedSlots.spec.js b/test/specs/mounting-options/scopedSlots.spec.js index 511c4423a..495a89ccb 100644 --- a/test/specs/mounting-options/scopedSlots.spec.js +++ b/test/specs/mounting-options/scopedSlots.spec.js @@ -305,4 +305,25 @@ describeWithShallowAndMount('scopedSlots', mountingMethod => { expect(wrapper.html()).to.contain('span') } ) + + itDoNotRunIf( + vueVersion < 2.5 || mountingMethod.name !== 'mount', + 'resolves v-model directive', + () => { + const wrapper = mountingMethod( + { + template: '
', + data() { return { text: 'text' } } + }, + { + scopedSlots: { + single: '' + } + } + ) + + wrapper.find('input').setValue('abc') + expect(wrapper.find('input').element.value).to.equal('abc') + } + ) }) From 09b1d48be1c84f60078d230f4ecb17dfc2e4fd6b Mon Sep 17 00:00:00 2001 From: Daniel Small Date: Thu, 1 Aug 2019 13:39:56 +1000 Subject: [PATCH 2/2] fix: lint --- test/specs/mounting-options/scopedSlots.spec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/specs/mounting-options/scopedSlots.spec.js b/test/specs/mounting-options/scopedSlots.spec.js index 495a89ccb..1c522e7c7 100644 --- a/test/specs/mounting-options/scopedSlots.spec.js +++ b/test/specs/mounting-options/scopedSlots.spec.js @@ -313,7 +313,9 @@ describeWithShallowAndMount('scopedSlots', mountingMethod => { const wrapper = mountingMethod( { template: '
', - data() { return { text: 'text' } } + data() { + return { text: 'text' } + } }, { scopedSlots: {