国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - Why does my router-link in vue not work?
漂亮男人
漂亮男人 2017-05-16 13:38:06
0
2
799
<template>
  <p id="app">
      <headers></headers>
          <p class="tap">
              
          <p class="tab-item">
          <router-link to="/goods">第一項</router-link>
        </p>
        <p class="tab-item">
          <router-link to="/ratings">第二項</router-link>
        </p>
        <p class="tab-item">
          <router-link to="/seller">第三項</router-link>
        </p>
        
        <router-view></router-view> 
      </p>
  </p>
</template>
<script>
import headers from './components/header/header';
    
export default {
    components:{
        headers
    },
  name: 'app',
};
</script>

This is the content of App.vue. In fact, the page display has been mounted as a tag, but clicking has no effect, and there is no effect of clicking to change components

<template>
    <p id="goods">
        <p @:click="say()">
            ssssss
        </p>
    </p>
</template>

<script>
    export default{
        name:{
            'goods'
        },
        method:{
            say:{
                console.log('sayhi');
            }
        }
    }
</script>

This is the code for one of the routers. The other two are basically the same. How to get the effect?

漂亮男人
漂亮男人

reply all(2)
黃舟

1. Is the routing path correct?
2. The method is written wrong, methods
3. The function say( ){} or say: function(){} should be written below methods
4.@:click should be @click

漂亮男人

0.0.00.00.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template