Update app.js

This commit is contained in:
邹景立 2021-11-24 23:45:59 +08:00
parent 84261c2a55
commit 3714683d80

View File

@ -33,12 +33,12 @@
router.beforeEach(function (to, fr, next) { router.beforeEach(function (to, fr, next) {
let page = to.fullPath; const page = to.fullPath;
if (to.fullPath === '/') { if (to.fullPath === '/') {
page = './static/template/index.vue'; page = './static/template/index.vue';
} }
let name = page.replace(/[.\/]+/g, '_'); const name = page.replace(/[.\/]+/g, '_');
if (router.hasRoute(name)) { if (router.hasRoute(name)) {
next(); next();
} else { } else {