Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
6b7f688e
Commit
6b7f688e
authored
Apr 24, 2021
by
Vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(menu): ensure that the external link jumps correctly, fix #516
parent
7f6f8eef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
SimpleMenu.vue
src/components/SimpleMenu/src/SimpleMenu.vue
+9
-2
MixSider.vue
src/layouts/default/sider/MixSider.vue
+1
-1
No files found.
src/components/SimpleMenu/src/SimpleMenu.vue
View file @
6b7f688e
...
...
@@ -20,6 +20,7 @@
<
script
lang=
"ts"
>
import
type
{
MenuState
}
from
'
./types
'
;
import
type
{
Menu
as
MenuType
}
from
'
/@/router/types
'
;
import
type
{
RouteLocationNormalizedLoaded
}
from
'
vue-router
'
;
import
{
defineComponent
,
computed
,
ref
,
unref
,
reactive
,
toRefs
,
watch
}
from
'
vue
'
;
import
{
useDesign
}
from
'
/@/hooks/web/useDesign
'
;
...
...
@@ -29,8 +30,9 @@
import
{
listenerRouteChange
}
from
'
/@/logics/mitt/routeChange
'
;
import
{
propTypes
}
from
'
/@/utils/propTypes
'
;
import
{
REDIRECT_NAME
}
from
'
/@/router/constant
'
;
import
{
RouteLocationNormalizedLoaded
,
useRouter
}
from
'
vue-router
'
;
import
{
isFunction
}
from
'
/@/utils/is
'
;
import
{
useRouter
}
from
'
vue-router
'
;
import
{
isFunction
,
isUrl
}
from
'
/@/utils/is
'
;
import
{
openWindow
}
from
'
/@/utils
'
;
import
{
useOpenKeys
}
from
'
./useOpenKeys
'
;
export
default
defineComponent
({
...
...
@@ -127,11 +129,16 @@
}
async
function
handleSelect
(
key
:
string
)
{
if
(
isUrl
(
key
))
{
openWindow
(
key
);
return
;
}
const
{
beforeClickFn
}
=
props
;
if
(
beforeClickFn
&&
isFunction
(
beforeClickFn
))
{
const
flag
=
await
beforeClickFn
(
key
);
if
(
!
flag
)
return
;
}
emit
(
'
menuClick
'
,
key
);
isClickGo
.
value
=
true
;
...
...
src/layouts/default/sider/MixSider.vue
View file @
6b7f688e
...
...
@@ -86,7 +86,7 @@
import
{
ScrollContainer
}
from
'
/@/components/Container
'
;
import
{
SimpleMenuTag
}
from
'
/@/components/SimpleMenu
'
;
import
Icon
from
'
/@/components/Icon
'
;
import
{
Icon
}
from
'
/@/components/Icon
'
;
import
{
AppLogo
}
from
'
/@/components/Application
'
;
import
Trigger
from
'
../trigger/HeaderTrigger.vue
'
;
...
...
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