第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

vue.js中使用router路由設(shè)置后children的component失效。

vue.js中使用router路由設(shè)置后children的component失效。

飲歌長(zhǎng)嘯 2018-12-21 19:14:46
import Vue from 'vue'import Router from 'vue-router'import Hello from '@/components/Hello'import Apple from '@/components/apple';import Banbana from '@/components/banbana';import RedApple from '@/components/redapple';Vue.use(Router);export default new Router({  mode: 'history',  routes: [ //路由配置    {      path: '/',      component: Hello    },    {      path: '/apple',      component: Apple,      children: [        {          path: 'red',          component: RedApple        }      ]    },    {      path: '/banbana',      component: Banbana    }  ]})以上代碼中 8080/ 是輸出組件Hello是正確的 , 8080/apple 輸入的是組件apple也是正確的 , 但是輸入8080/apple/red 的時(shí)候不會(huì)跳轉(zhuǎn)到 path:'red'對(duì)應(yīng)的子組件RedApple中。用import RedApple from '../components/redapple'的方法在 components : {RedApple} 注冊(cè)后在頁(yè)面中使用 <RedApple></RedApple> 是可以直接輸出 RedApple里面的內(nèi)容的,而使用路由卻不行,這是為什么呢?本人剛剛開(kāi)始學(xué)習(xí)vue.js不久... 求大佬們指點(diǎn)!謝謝大家!
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 5452 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)