摘要:        
视频 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>正则扩展-命    阅读全文
        
            posted @ 2023-03-29 13:00
垂序葎草
阅读(22)
评论(0)
推荐(0)
        
            
        
        
摘要:        
视频 6.路由的params参数 配置路由,声明接收params参数 { path:'/home', component:Home, children:[ { path:'news', component:News }, { component:Message, children:[ { name:    阅读全文
        
            posted @ 2023-03-29 12:34
垂序葎草
阅读(404)
评论(0)
推荐(0)
        
            
        
        
摘要:        
视频 5.命名路由 作用:可以简化路由的跳转。 如何使用 给路由命名: { path:'/demo', component:Demo, children:[ { path:'test', component:Test, children:[ { name:'hello' //给路由命名 path:'    阅读全文
        
            posted @ 2023-03-29 12:20
垂序葎草
阅读(45)
评论(0)
推荐(0)
        
            
        
        
摘要:        
视频 4.路由的query参数 传递参数 <!-- 跳转并携带query参数,to的字符串写法 --> <router-link :to="/home/message/detail?id=666&title=你好">跳转</router-link> <!-- 跳转并携带query参数,to的对象写法    阅读全文
        
            posted @ 2023-03-29 12:10
垂序葎草
阅读(181)
评论(0)
推荐(0)
        
            
        
        
摘要:        
视频 3.多级路由(多级路由) 配置路由规则,使用children配置项: routes:[ { path:'/about', component:About, }, { path:'/home', component:Home, children:[ //通过children配置子级路由 { pa    阅读全文
        
            posted @ 2023-03-29 03:58
垂序葎草
阅读(184)
评论(0)
推荐(0)
        
            
        
        
摘要:        
视频 2.几个注意点 路由组件通常存放在pages文件夹,一般组件通常存放在components文件夹。 通过切换,“隐藏”了的路由组件,默认是被销毁掉的,需要的时候再去挂载。 每个组件都有自己的$route属性,里面存储着自己的路由信息。 整个应用只有一个router,可以通过组件的$router    阅读全文
        
            posted @ 2023-03-29 03:52
垂序葎草
阅读(22)
评论(0)
推荐(0)
        
            
        
        
摘要:        
npm i router@3 1.基本使用 安装vue-router,命令:npm i vue-router 应用插件:Vue.use(VueRouter) 编写router配置项: //引入VueRouter import VueRouter from 'vue-router' //引入Luyou    阅读全文
        
            posted @ 2023-03-29 03:39
垂序葎草
阅读(29)
评论(0)
推荐(0)
        
                    
                
浙公网安备 33010602011771号