Skip to content

F7+Vue: нет слота "list" и невозможно вынести f7-list-item в отдельный компонент #4195

Closed
@shastox

Description

@shastox

Баг:

Тут нет слота list: https://github.com/framework7io/framework7/blob/master/src/vue/components/list.vue как сказано в документации https://framework7.io/vue/list-view#list-slots

Проблема:

<f7-list>
     <my-list-item/>
</f7-list>

Где <my-list-item> это:
<f7-list-item title="..." />

Работать не будет, споткнется здесь https://github.com/framework7io/framework7/blob/master/src/vue/components/list.vue#L245 потому, что indexOf не определен

Вынести <f7-list-item title="..." /> в свой компонент сейчас можно примерно так:

<f7-list>
    <ul> - обязательно добавить вручную
        <my-list-item v-if="isLoaded"/>
    </ul>
</f7-list>

onMounted: isLoaded = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions