React + React-router-dom v6
我目前编写的路由表为:
useRoutes(
[
{
path: '/',
element: <Home />,
children: [
{
path: '/',
element: <List />
},
{
path: 'detail',
element: <Detail />
}
]
},
{
path: '/order',
element: <Order />
},
{
path: '/p/:contentId/:premissionId',
element: <Share />
}
]
)
当我在浏览器地址栏输入http:// xxx.xxx.xxx.xxx: 3000/p/aaa/bbb,并不能匹配到'/p/:contentId/:premissionId', 请问这是咋回事?
history模式需要服务端支持以下,要不改为hash模式试试?