How to use f7-list-item as a Vue single file component


#1

I’m using Webpack and Vue.

I have something like this:

https://jsfiddle.net/enylin/1qcm8v50/79/

I want to move the component “my-list-item” to another file and import it as a Vue single file component.

But after I move the component to another file, it cannot render correctly.

It will look like this:

How should I use f7-list-item inside a single file component?


#2

Just add slot="list" to your custom component:

<my-list-item slot="list" ...