mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
chore: vue-router-next api change
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { nextTick } from 'vue';
|
||||
import VueRouter from 'vue-router';
|
||||
import { createRouter, createWebHashHistory } from 'vue-router';
|
||||
import DemoHome from './components/DemoHome';
|
||||
import { decamelize } from '../common';
|
||||
import { demos, config } from 'site-mobile-shared';
|
||||
@@ -81,8 +81,8 @@ function getRoutes() {
|
||||
return routes;
|
||||
}
|
||||
|
||||
export const router = new VueRouter({
|
||||
mode: 'hash',
|
||||
export const router = createRouter({
|
||||
mode: createWebHashHistory(),
|
||||
routes: getRoutes(),
|
||||
scrollBehavior: (to, from, savedPosition) => savedPosition || { x: 0, y: 0 },
|
||||
});
|
||||
|
Reference in New Issue
Block a user