Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-05-26 02:20:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
44c3cc393d768e69dd46fca0ad333df8c920361b
44c3cc39
1 parent
2d6ee3c1
新增路由跳转钩子
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
src/hooks/useGo.js
src/hooks/useGo.js
0 → 100644
View file @
44c3cc3
1
+
import
{
useRouter
}
from
'vue-router'
;
2
+
3
+
export
function
useGo
()
{
4
+
let
router
=
useRouter
()
5
+
function
go
(
path
,
query
)
{
6
+
router
.
push
({
7
+
path
:
path
,
8
+
query
:
query
9
+
})
10
+
}
11
+
return
go
12
+
}
Please
register
or
login
to post a comment