Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaofang li
MeterSphere
Commits
23a721d2
Commit
23a721d2
authored
4 years ago
by
Captain.B
Committed by
刘瑞斌
4 years ago
Browse files
Options
Download
Email Patches
Plain Diff
refactor: 优化切换组织和工作空间刷新页面
parent
ace55e4e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/business/App.vue
+11
-4
frontend/src/business/App.vue
frontend/src/business/components/common/head/HeaderOrgWs.vue
+5
-2
frontend/src/business/components/common/head/HeaderOrgWs.vue
with
16 additions
and
6 deletions
+16
-6
frontend/src/business/App.vue
+
11
-
4
View file @
23a721d2
...
...
@@ -5,7 +5,7 @@
<component
:is=
"licenseHeader"
></component>
</el-col>
</el-row>
<el-row
id=
"header-top"
type=
"flex"
justify=
"space-between"
align=
"middle"
>
<el-row
id=
"header-top"
type=
"flex"
justify=
"space-between"
align=
"middle"
v-if=
"isMenuShow"
>
<el-col
:span=
"12"
>
<img
:src=
"'/display/file/logo'"
class=
"logo"
alt=
""
>
<ms-top-menus
:color=
"color"
/>
...
...
@@ -53,6 +53,7 @@ export default {
color
:
''
,
sessionTimer
:
null
,
isShow
:
true
,
isMenuShow
:
true
,
};
},
created
()
{
...
...
@@ -106,7 +107,8 @@ export default {
// 提供可注入子组件属性
provide
()
{
return
{
reload
:
this
.
reload
reload
:
this
.
reload
,
reloadTopMenus
:
this
.
reloadTopMenus
,
}
},
methods
:
{
...
...
@@ -147,11 +149,16 @@ export default {
reload
()
{
// 先隐藏
this
.
isShow
=
false
// $nextTick() 将回调延迟到下次 DOM 更新循环之后执行
this
.
$nextTick
(()
=>
{
this
.
isShow
=
true
})
},
reloadTopMenus
()
{
// 先隐藏
this
.
isMenuShow
=
false
this
.
$nextTick
(()
=>
{
this
.
isMenuShow
=
true
})
}
},
components
:
{
...
...
This diff is collapsed.
Click to expand it.
frontend/src/business/components/common/head/HeaderOrgWs.vue
+
5
-
2
View file @
23a721d2
...
...
@@ -70,6 +70,9 @@ export default {
this
.
initMenuData
();
this
.
getCurrentUserInfo
();
},
inject
:
[
'
reloadTopMenus
'
],
data
()
{
return
{
organizationList
:
[
...
...
@@ -154,7 +157,7 @@ export default {
// localStorage.removeItem(PROJECT_ID);
// }
this
.
$router
.
push
(
'
/
'
).
then
(()
=>
{
window
.
location
.
reload
();
this
.
reloadTopMenus
();
}).
catch
(
err
=>
err
);
});
},
...
...
@@ -172,7 +175,7 @@ export default {
// localStorage.removeItem(PROJECT_ID);
// }
this
.
$router
.
push
(
'
/
'
).
then
(()
=>
{
window
.
location
.
reload
();
this
.
reloadTopMenus
();
}).
catch
(
err
=>
err
);
});
},
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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