🌐 AI搜索 & 代理 主页
Skip to content

<B-Table> events for $router.push is not working in Nuxt #4465

@jojowonder

Description

@jojowonder

Hello Guys,

I just found a weird behaviour related events in B-Table when directing to $router.push().

      <b-table
        :fields="table.fields"
        :items="table.items"
        bordered
        hover
        @row-clicked="$router.push({
          path: 'product/list'
        })"
      />

i got an error message like below
image

But if i just insert nuxt-link tag somewhere in any slot, the event will work as expected

       <b-table
        :fields="table.fields"
        :items="table.items"
        bordered
        hover
        @row-clicked="$router.push({
          path: 'product/list'
        })"
      >
        <template v-slot:cell(index)="data">
          <nuxt-link to="product/list" />
        </template>
      </b-table>

Versions

Libraries:

  • BootstrapVue: 2.1.0
  • Bootstrap: 4.4.1
  • Nuxt : 2.10.2

Environment:

  • Device: Mac
  • OS: macOS Catalina
  • Browser: Chrome
  • Version: 78.0.3904.108

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions