The reason is that the history mode is used HTML5 history mode | Vue router
I didn’t find a solution
So we changed the routing to hash mode
I use cli3
It was
import {createRouter, createWebHistory} from 'vue-router'
const router = createRouter({
history: createWebHistory(process.env.BASE_URL),
routes
})
Change to
import {createRouter, createWebHashHistory} from 'vue-router'
const router = createRouter({
model:'hash',
history: createWebHashHistory(),
routes
})
It’s normal after modification