Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-base
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 01557420
authored
Sep 26, 2023
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
d02b4f5f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
src/layout/components/LeftSide/LeftSideMenuLv3.vue
src/layout/components/LeftSide/MenuLv4.vue
src/layout/components/LeftSide/LeftSideMenuLv3.vue
View file @
0155742
...
@@ -7,9 +7,11 @@
...
@@ -7,9 +7,11 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
currentId
}
from
'./mixins/index'
export
default
{
export
default
{
name
:
'LeftSideMenuLv3'
,
name
:
'LeftSideMenuLv3'
,
inject
:
[
'bus'
],
inject
:
[
'bus'
],
mixins
:
[
currentId
],
props
:
{
props
:
{
menuItems
:
{
menuItems
:
{
type
:
Array
,
type
:
Array
,
...
@@ -17,7 +19,9 @@ export default {
...
@@ -17,7 +19,9 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
handleSelect
({
path
,
children
=
[]
})
{
handleSelect
({
path
,
children
=
[],
id
})
{
const
{
lv1
,
lv2
,
lv3
}
=
this
.
current
if
(
id
==
`
${
lv1
}
-
${
lv2
}
-
${
lv3
}
`
)
return
if
(
path
&&
path
.
startsWith
(
'/'
)
&&
!
path
.
startsWith
(
'/^'
))
{
if
(
path
&&
path
.
startsWith
(
'/'
)
&&
!
path
.
startsWith
(
'/^'
))
{
this
.
$router
.
push
(
path
)
this
.
$router
.
push
(
path
)
}
}
...
@@ -51,7 +55,7 @@ $menu-item-width: 144px !important;
...
@@ -51,7 +55,7 @@ $menu-item-width: 144px !important;
//
padding-left
:
0
!important
;
//
padding-left
:
0
!important
;
padding
:
0
8px
!important
;
padding
:
0
8px
!important
;
span
{
span
{
@include
menu-title-span-haspage
@include
menu-title-span-haspage
;
}
}
&
.is-active
{
&
.is-active
{
@include
menu-highlight;
@include
menu-highlight;
...
...
src/layout/components/LeftSide/MenuLv4.vue
View file @
0155742
...
@@ -32,7 +32,6 @@ export default {
...
@@ -32,7 +32,6 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
bus
.
$on
(
'menu3Changed'
,
this
.
onMenu3Changed
)
this
.
bus
.
$on
(
'menu3Changed'
,
this
.
onMenu3Changed
)
this
.
onLoad
()
},
},
beforeDestroy
()
{
beforeDestroy
()
{
this
.
bus
.
$off
(
'menu3Changed'
,
this
.
onMenu3Changed
)
this
.
bus
.
$off
(
'menu3Changed'
,
this
.
onMenu3Changed
)
...
@@ -42,13 +41,11 @@ export default {
...
@@ -42,13 +41,11 @@ export default {
this
.
$router
.
push
(
item
.
name
)
this
.
$router
.
push
(
item
.
name
)
},
},
setActive
(
activeId
=
''
,
nav4
=
[])
{
setActive
(
activeId
=
''
,
nav4
=
[])
{
if
(
this
.
id
==
activeId
)
return
// console.log(this.id , activeId);
this
.
id
=
activeId
this
.
nav4
=
nav4
this
.
nav4
=
nav4
if
(
nav4
.
length
)
{
if
(
nav4
.
length
)
{
const
sub
=
nav4
.
find
(({
id
})
=>
id
==
activeId
)
const
sub
=
nav4
.
find
(({
id
})
=>
id
==
activeId
)
if
(
sub
)
{
if
(
sub
)
{
if
(
this
.
activeName
==
sub
.
path
)
return
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
console
.
log
(
sub
.
path
)
console
.
log
(
sub
.
path
)
this
.
$router
.
push
(
sub
.
path
)
this
.
$router
.
push
(
sub
.
path
)
...
@@ -66,12 +63,15 @@ export default {
...
@@ -66,12 +63,15 @@ export default {
},
},
onLoad
()
{
onLoad
()
{
const
{
lv1
,
lv2
,
lv3
,
lv4
}
=
this
.
current
const
{
lv1
,
lv2
,
lv3
,
lv4
}
=
this
.
current
if
(
lv1
&&
lv2
&&
lv3
&&
lv4
)
{
const
lv3id
=
`
${
lv1
}
-
${
lv2
}
-
${
lv3
}
`
const
lv3id
=
`
${
lv1
}
-
${
lv2
}
-
${
lv3
}
`
const
lv4id
=
`
${
lv3id
}
-
${
lv4
}
`
const
lv4id
=
`
${
lv3id
}
-
${
lv4
}
`
console
.
log
(
lv4id
);
const
sub
=
this
.
find
(
lv3id
)?.
children
||
[]
const
sub
=
this
.
find
(
lv3id
)?.
children
||
[]
const
nav4
=
sub
.
noHidden
()
const
nav4
=
sub
.
noHidden
()
this
.
setActive
(
lv4id
,
nav4
)
this
.
setActive
(
lv4id
,
nav4
)
}
else
{
this
.
setActive
(
''
,
[])
}
}
}
}
}
}
}
...
...
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