在router/index.js中添加
{
path: "/404",
name: "notFound",
component: notFound
}, {
path: "*", // 此处需特别注意置于最底部
redirect: "/404"
}
在router/index.js中添加
{
path: "/404",
name: "notFound",
component: notFound
}, {
path: "*", // 此处需特别注意置于最底部
redirect: "/404"
}