目录

工欲善其事

实践出真知

活跃标签: linux java mysql 待分类 js springboot win10 电路 vue macOS nginx esp32 git docker windows idea maven esp8266 python Arduino

存档:

vue-router中参数设置的问题

在router配置 url组成的角度来分析:
ee0884ea75994c1baf35c35d3cb7c170.png

scheme:协议 (例如http、https) authority(user/information/host/prot)一般会忽略

path:获取资源的路径就是在router中我们在route中需要的path

const route = [
    {
        path: '/Home',
        component: Home
    }
]

query:查询参数 在router-link中需要配置的参数(只能是对象)

<router-link :to="{path: "'/Home/'+id", query: { weiget: 140, height: 1.8 }">首页<router-link>

fragidl: 一般也忽略

PS:注意query必须是对象类型,因为包含多个查询参数。


标题:vue-router中参数设置的问题
作者:llilei
地址:http://solo.llilei.work/articles/2022/10/12/1665559060262.html