Alexis Rodas
Alexis Rodas

Reputation: 1

Problems with nuxt and adminlte

I am using admin lte and nuxt for a project I am doing, but I am having the following problem: To generate a list with dropdown options use:

<nav class="mt-2">
    <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
        data-accordion="false">
        <li v-for="modulo in lstModulos" class="nav-item menu">
            <a class="nav-link d-flex cursor-pointer">
                <i :class="['spw24', modulo.modl_icon]" class="ml-[-7px]"></i>
                <p class="ml-2">
                    {{ modulo.modl_nombre }}
                    <i class="right fas fa-angle-left"></i>
                </p>
            </a>
            <ul class="nav nav-treeview">
                <li v-for="programa in modulo.admin_programas" class="nav-item">
                    <a @click="openWindow(programa.prog_namejs)" class="nav-link d-flex cursor-pointer">
                        <i class="my-auto" :class="['spw', programa.prog_icono]"></i>
                        <p class="ml-2">{{ programa.prog_nomb }}</p>
                    </a>
                </li>
            </ul>
        </li>
    </ul>
</nav>

In dev mode, when generating the page, the components do not work, I have to reload the page for the dropdowns to work, and when transferring it to production (npm run generate), the dropdowns do not work even reloading the page. I have tried different ways to make it work, but they don't work, maybe someone has the same problem or knows how to solve it, thanks :(

I'm looking for a way for dropdowns to work on the first load

Upvotes: 0

Views: 15

Answers (0)

Related Questions