diff --git a/src/core/vdom/helpers/normalize-scoped-slots.js b/src/core/vdom/helpers/normalize-scoped-slots.js index 813f570589..49c4e2effa 100644 --- a/src/core/vdom/helpers/normalize-scoped-slots.js +++ b/src/core/vdom/helpers/normalize-scoped-slots.js @@ -48,8 +48,8 @@ export function normalizeScopedSlots ( } function normalizeScopedSlot(normalSlots, key, fn) { - const normalized = scope => { - let res = fn(scope || {}) + const normalized = function () { + let res = arguments.length ? fn.apply(null, arguments) : fn({}) res = res && typeof res === 'object' && !Array.isArray(res) ? [res] // single vnode : normalizeChildren(res) diff --git a/test/unit/features/component/component-scoped-slot.spec.js b/test/unit/features/component/component-scoped-slot.spec.js index b87b360009..30e51b9393 100644 --- a/test/unit/features/component/component-scoped-slot.spec.js +++ b/test/unit/features/component/component-scoped-slot.spec.js @@ -1128,4 +1128,20 @@ describe('Component scoped slot', () => { expect(vm.$el.textContent).toBe(`baz bar`) }).then(done) }) + + // #9468 + it('should support passing multiple args to scoped slot function', () => { + const foo = { + render() { + return this.$scopedSlots.default('foo', 'bar') + } + } + + const vm = new Vue({ + template: `{{ foo }} {{ bar }}`, + components: { foo } + }).$mount() + + expect(vm.$el.textContent).toBe('foo bar') + }) })