"TypeError: Cannot read property'_normalized' of undefined" appears when using <router-link>

Insert picture description here
Attach code

<li v-for="rows in item.smallTitle" :key="rows.id"> 
            <router-link :to="rows.path">{
    
    {
    
    rows.name}}</router-link>
</li>

The data that I want to pass in the past is

 smallTitle:[
            {
    
    name:'宠物',path:'/petshop'},
            {
    
    name:'宠物用品',path:'/petproduct'}
            ]

Solution

<li v-for="rows in item.smallTitle" :key="rows.id"> 
            <router-link :to="{path:rows.path}">{
    
    {
    
    rows.name}}</router-link>
</li>

Guess you like

Origin blog.csdn.net/d1063270962/article/details/113917829