0
VUE路由器的URL显示为的 '#' 在我的网址是不正确的,当我用快递
本地主机:3000/指数# /仪表板
但不
本地主机:3000/指数/# /仪表板
这是一种有线。
这是我的快递代码。
app.get('/index', function (req, res) {
const html = fs.readFileSync('index.html', 'utf-8');
res.send(html);
});
而我的vue路由器代码。
{
name: 'dashboard',
path: '/dashboard',
component: require('../views/dashboard.vue')
}
如果我这样做,将URL'本地主机:3000/dashboard' ,但我想保留路径'/ index /' –