Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
71a2fddb
authored
Oct 27, 2024
by
芋道源码
Committed by
Gitee
Oct 27, 2024
Browse files
Options
Browse Files
Download
Plain Diff
!568 修复hash路由无法跳转
Merge pull request !568 from hecongyuan/master
parents
8bdf60c8
3859a488
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
+2
-1
src/utils/is.ts
+2
-1
No files found.
src/utils/is.ts
View file @
71a2fddb
...
@@ -98,8 +98,9 @@ export const isServer = typeof window === 'undefined'
...
@@ -98,8 +98,9 @@ export const isServer = typeof window === 'undefined'
export
const
isClient
=
!
isServer
export
const
isClient
=
!
isServer
export
const
isUrl
=
(
path
:
string
):
boolean
=>
{
export
const
isUrl
=
(
path
:
string
):
boolean
=>
{
// fix:修复hash路由无法跳转的问题
const
reg
=
const
reg
=
/
(((
^https
?
:
(?:\/\/)?)(?:[
-:&=
\+\$
,
\w]
+@
)?[
A-Za-z0-9.-
]
+
(?:
:
\d
+
)?
|
(?:
www.|
[
-:&=
\+\$
,
\w]
+@
)[
A-Za-z0-9.-
]
+
)((?:\/[\+
~%
\/
.
\w
-_
]
*
)?\??(?:[
-
\+
=&%@.
\w
_
]
*
)
#
?(?:[\w]
*
))?)
$/
/
(((
^https
?
:
(?:\/\/)?)(?:[
-:&=
\+\$
,
\w]
+@
)?[
A-Za-z0-9.-
]
+
(?:
:
\d
+
)?
|
(?:
www.|
[
-:&=
\+\$
,
\w]
+@
)[
A-Za-z0-9.-
]
+
)((?:\/[\+
~%#
\/
.
\w
-_
]
*
)?\??(?:[
-
\+
=&%@.
\w
_
]
*
)
#
?(?:[\w]
*
))?)
$/
return
reg
.
test
(
path
)
return
reg
.
test
(
path
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment