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..1c522e7c7 100644 --- a/test/specs/mounting-options/scopedSlots.spec.js +++ b/test/specs/mounting-options/scopedSlots.spec.js @@ -305,4 +305,27 @@ 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') + } + ) })