Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 67630f41
authored
Apr 27, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix:解决vue-router路由push方法在3.0.5 catch报错问题
1 parent
207710f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
package.json
src/router/index.js
yarn.lock
package.json
View file @
67630f4
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
"vue"
:
"^2.6.10"
,
"vue"
:
"^2.6.10"
,
"vue-i18n"
:
"^8.14.0"
,
"vue-i18n"
:
"^8.14.0"
,
"vue-qr"
:
"^2.5.0"
,
"vue-qr"
:
"^2.5.0"
,
"vue-router"
:
"
^3.0.3
"
,
"vue-router"
:
"
3.0.5
"
,
"vuex"
:
"^3.0.1"
,
"vuex"
:
"^3.0.1"
,
"xlsx"
:
"^0.16.9"
"xlsx"
:
"^0.16.9"
},
},
...
...
src/router/index.js
View file @
67630f4
...
@@ -15,6 +15,8 @@ import routes from './routes'
...
@@ -15,6 +15,8 @@ import routes from './routes'
const
originalPush
=
VueRouter
.
prototype
.
push
// 解决连续点击路由异常问题 limin
const
originalPush
=
VueRouter
.
prototype
.
push
// 解决连续点击路由异常问题 limin
VueRouter
.
prototype
.
push
=
function
push
(
location
,
onResolve
,
onReject
)
{
VueRouter
.
prototype
.
push
=
function
push
(
location
,
onResolve
,
onReject
)
{
// 解决Uncaught (in promise) 控制台报错问题
// 解决Uncaught (in promise) 控制台报错问题
// console.log(onResolve)
// console.log(onReject)
if
(
onResolve
||
onReject
)
{
if
(
onResolve
||
onReject
)
{
return
originalPush
.
call
(
this
,
location
,
onResolve
,
onReject
)
return
originalPush
.
call
(
this
,
location
,
onResolve
,
onReject
)
}
}
...
...
yarn.lock
View file @
67630f4
...
@@ -9972,10 +9972,10 @@ vue-qr@^2.5.0:
...
@@ -9972,10 +9972,10 @@ vue-qr@^2.5.0:
resolved "https://registry.npmjs.org/vue-qr/-/vue-qr-2.5.0.tgz"
resolved "https://registry.npmjs.org/vue-qr/-/vue-qr-2.5.0.tgz"
integrity sha512-lVCEqzZyhrZ49dr6n1C4dMNH/tvKJzRwJhCi9vxWYpiosYTWM0J5m5RsJ745S88XWwgTeOynKMGbyOLG9ZP20Q==
integrity sha512-lVCEqzZyhrZ49dr6n1C4dMNH/tvKJzRwJhCi9vxWYpiosYTWM0J5m5RsJ745S88XWwgTeOynKMGbyOLG9ZP20Q==
vue-router@
^3.0.3
:
vue-router@
3.0.5
:
version "3.
1.2
"
version "3.
0.5
"
resolved "https://registry.npm
js.org/vue-router/-/vue-router-3.1.2.tgz
"
resolved "https://registry.npm
mirror.com/vue-router/-/vue-router-3.0.5.tgz#24636923c7f1a62da3a577cf75a058f9fa328581
"
integrity sha512-
WssQEHSEvIS1/CI4CO2T8LJdoK4Q9Ngox28K7FDNMTfzNTk2WS5D0dDlqYCaPG+AG4Z8wJkn1KrBc7AhspZJU
Q==
integrity sha512-
DGU+7+eeiSq/oNZ6epA/rcNkAd0m2+uugR5i4Eh4KBvclUmorvNJ6iForYjQkgvKi9GdamybaMpl85eDgxM2e
Q==
vue-style-loader@^4.1.0:
vue-style-loader@^4.1.0:
version "4.1.2"
version "4.1.2"
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment