Answer the question
In order to leave comments, you need to log in
How to pass a component to slot?
Good afternoon!
Cannot pass a component to another component's slot.
// компонент Test
<template>
<div>
<slot name="test_slot"></slot>
</div>
</template>
// создаем экземпляр компонента Test
const TestComponent= Vue.extend(Test);
let component = new TestComponent({
el: document.createElement('div'),
propsData
});
// другой компонент
let componentSome = Vue.extend(Some);
let content = new componentSome ({
el: document.createElement('div')
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question