單頁面多路由區操作

weixin_34248705發表於2018-07-09
4852919-95f3fb7a907a8167.png
image.png
4852919-56b477eececd0cf5.png
image.png

<template>
  <div id="app">
    <img src="./assets/logo.png">

     <div>

         <router-link to="/" >首頁</router-link>|
         <router-link to="/xin">第二頁</router-link>|
         <router-link :to="{name:'x1',params:{us:'xiao',xx:'zhazha'}}" >xin-x1</router-link>|
         <router-link :to="{name:'x2',params:{pa:'sun'}}">xin-x2</router-link>|
         <router-link :to="{name:'dan',params:{dan:'route'}}">dan</router-link>
     </div>

     <router-view></router-view>
     <router-view name="left" class="fd" ></router-view>
     <router-view name="right"  class="fy"></router-view>

  </div>
</template>

$router

4852919-6bca7faf7f0d563e.png
image.png
import dan from '@/dan/dan'
import dan1 from '@/dan/dan1'
import dan2 from '@/dan/dan2'

相關文章