【modify】使用ESLint格式化代码
This commit is contained in:
@@ -5,7 +5,7 @@ import { constantRouterMap } from '@/config/router.config'
|
||||
Vue.use(Router)
|
||||
|
||||
const originalPush = Router.prototype.push
|
||||
Router.prototype.push = function push(location, onResolve, onReject) {
|
||||
Router.prototype.push = function push (location, onResolve, onReject) {
|
||||
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
}
|
||||
@@ -15,4 +15,4 @@ export default new Router({
|
||||
base: process.env.BASE_URL,
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRouterMap
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user