Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-portal
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
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1f877a14
authored
Jun 02, 2021
by
冒粤蓉
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
fix
2 parents
c3883cec
16845518
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
5 deletions
src/components/DesktopRightSider/DesktopRightSider.vue
src/components/DesktopRightSider/DesktopRightSider.vue
View file @
1f877a1
...
@@ -38,6 +38,43 @@ export default {
...
@@ -38,6 +38,43 @@ export default {
// 监听子系统挂载的元素内容变化
// 监听子系统挂载的元素内容变化
const
subMircroEle
=
document
.
getElementById
(
'sub-system-frame'
);
const
subMircroEle
=
document
.
getElementById
(
'sub-system-frame'
);
subMircroEle
.
addEventListener
(
'DOMNodeInserted'
,
function
(
e
)
{
const
target
=
e
.
currentTarget
,
tarInner
=
target
.
innerHTML
;
if
(
!
state
.
el_sub_innerH
!==
!
tarInner
)
{
state
.
el_sub_innerH
=
target
.
innerHTML
;
}
})
})
const
showEmpty
=
computed
(()
=>
{
return
store
.
getters
.
commonData
.
showEmpty
||
!
state
.
el_sub_innerH
;
})
const
breadCrumbList
=
computed
(()
=>
{
const
curBreadCrumb
=
store
.
getters
.
curBreadCrumb
,
curParent
=
curBreadCrumb
[
'parent'
],
curChildren
=
curBreadCrumb
[
'children'
];
let
breadCrumbList
=
[];
if
(
curParent
)
{
breadCrumbList
.
push
({
name
:
curChildren
.
menuName
?
curParent
.
menuName
:
curParent
.
menuName
});
}
if
(
curChildren
)
{
const
nextChildren
=
curChildren
.
children
;
breadCrumbList
.
push
({
name
:
nextChildren
?
curChildren
.
menuName
:
curChildren
.
menuName
,
path
:
curChildren
.
path
,
active
:
nextChildren
?
false
:
true
});
const
store
=
useStore
();
onMounted
(()
=>
{
state
.
el_sub_innerH
=
elmSubMicro
.
_value
.
innerHTML
;
// 监听子系统挂载的元素内容变化
const
subMircroEle
=
document
.
getElementById
(
'sub-system-frame'
);
subMircroEle
.
addEventListener
(
'DOMNodeInserted'
,
function
(
e
)
{
subMircroEle
.
addEventListener
(
'DOMNodeInserted'
,
function
(
e
)
{
const
target
=
e
.
currentTarget
,
const
target
=
e
.
currentTarget
,
tarInner
=
target
.
innerHTML
;
tarInner
=
target
.
innerHTML
;
...
@@ -61,6 +98,40 @@ export default {
...
@@ -61,6 +98,40 @@ export default {
// store.dispatch('menu/setBreadCrumb', saveBreadCrumb);
// store.dispatch('menu/setBreadCrumb', saveBreadCrumb);
// history.pushState(null, path, path);
// history.pushState(null, path, path);
}
}
}
return
breadCrumbList
;
})
const
routerGo
=
(
item
,
path
)
=>
{
let
saveBreadCrumb
=
{};
const
thisName
=
item
.
name
.
replace
(
' / '
,
''
);
const
curBreadCrumb
=
store
.
getters
.
curBreadCrumb
,
curParent
=
curBreadCrumb
[
'parent'
],
curChildren
=
curBreadCrumb
[
'children'
];
if
(
thisName
===
curParent
.
menuName
)
{
saveBreadCrumb
.
parent
=
curParent
;
saveBreadCrumb
.
children
=
{};
return
false
;
}
if
(
curChildren
)
{
const
nextChildren
=
curChildren
.
children
;
if
(
thisName
===
curChildren
.
menuName
)
{
saveBreadCrumb
.
parent
=
curParent
;
if
(
nextChildren
)
{
delete
curChildren
.
children
;
}
saveBreadCrumb
.
children
=
curChildren
;
}
else
{
if
(
thisName
===
nextChildren
.
menuName
)
{
saveBreadCrumb
=
curBreadCrumb
;
}
}
}
store
.
dispatch
(
'menu/setBreadCrumb'
,
saveBreadCrumb
);
history
.
pushState
(
null
,
path
,
path
);
}
return
{
return
{
...
toRefs
(
state
),
...
toRefs
(
state
),
...
@@ -74,14 +145,14 @@ export default {
...
@@ -74,14 +145,14 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.glsx-right-side
>>>
.breadcrumb-item
span
{
.glsx-right-side
>>>
.breadcrumb-item
span
{
color
:
rgba
(
0
,
0
,
0
,
.45
);
color
:
rgba
(
0
,
0
,
0
,
0
.45
);
}
}
.glsx-right-side
>>>
.breadcrumb-item.active
span
{
.glsx-right-side
>>>
.breadcrumb-item.active
span
{
color
:
#2196f3
;
color
:
#2196f3
;
}
}
</
style
>
</
style
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
@import
'styles/variables.less'
;
@import
"styles/variables.less"
;
.glsx-right-side
{
.glsx-right-side
{
position
:
relative
;
position
:
relative
;
}
}
...
@@ -99,12 +170,11 @@ export default {
...
@@ -99,12 +170,11 @@ export default {
.
pointer
:
hover
{
.
pointer
:
hover
{
color
:
@
defaultTextColor
;
color
:
@
defaultTextColor
;
}
}
}
}
#sub-system-frame
{
#sub-system-frame
{
min-width
:
1190px
;
//
min-width
:
1190px
;
min-width
:
calc
(
100%
-
400px
);
}
}
.pointer
{
.pointer
{
...
...
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