Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-09-15 17:45:20 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
0f5999ffaf434075e42c5c0749a3392f4de5cbfa
0f5999ff
2 parents
dbd459d7
4d450277
Merge branch 'fix-issues' into uat
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
28 deletions
src/layout/index.vue
src/layout/mixin/ResizeHandler.js
src/store/modules/app.js
src/layout/index.vue
View file @
0f5999f
...
...
@@ -4,11 +4,11 @@
<sidebar class="sidebar-container"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{ hasTagsView: needTagsView }" class="main-container">
<div class="headerRef" :class="{ 'fixed-header': fixedHeader }"
ref="headerRef"
>
<div class="headerRef" :class="{ 'fixed-header': fixedHeader }">
<navbar />
<tags-view v-if="needTagsView" />
</div>
<app-main
ref="appMainBlock"
/>
<app-main />
<right-panel v-if="false">
<settings />
</right-panel>
...
...
src/layout/mixin/ResizeHandler.js
View file @
0f5999f
...
...
@@ -6,7 +6,6 @@ const WIDTH = 992; // refer to Bootstrap's responsive design
export
default
{
watch
:
{
$route
(
route
)
{
this
.
getBlockCurrentHeight
();
if
(
this
.
device
===
"mobile"
&&
this
.
sidebar
.
opened
)
{
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
false
});
}
...
...
@@ -23,10 +22,7 @@ export default {
if
(
isMobile
)
{
store
.
dispatch
(
"app/toggleDevice"
,
"mobile"
);
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
true
});
};
this
.
$nextTick
(()
=>
{
this
.
getBlockCurrentHeight
();
});
}
},
methods
:
{
// use $_ for mixins properties
...
...
@@ -45,11 +41,5 @@ export default {
}
}
},
getBlockCurrentHeight
()
{
let
appHeaderHeight
=
this
.
$refs
.
headerRef
.
clientHeight
;
let
appMainHeight
=
this
.
$refs
.
appMainBlock
.
$el
.
clientHeight
;
this
.
$store
.
dispatch
(
"app/setAppHeaderBlockCH"
,
appHeaderHeight
);
this
.
$store
.
dispatch
(
"app/setAppMainBlockCH"
,
appMainHeight
);
},
},
};
...
...
src/store/modules/app.js
View file @
0f5999f
...
...
@@ -10,8 +10,6 @@ const state = {
device
:
"desktop"
,
//size: Cookies.get('size') || 'medium'
size
:
localStorage
.
getItem
(
"size"
)
||
"medium"
,
headerBlockClientHeight
:
null
,
appMainBlockClientHeight
:
null
,
};
const
mutations
=
{
...
...
@@ -40,13 +38,8 @@ const mutations = {
//Cookies.set('size', size)
localStorage
.
setItem
(
"size"
,
size
);
},
SET_APPHEADERBLOCKCH
:
(
state
,
height
)
=>
{
state
.
headerBlockClientHeight
=
height
;
},
SET_APPMAINBLOCKCH
:
(
state
,
height
)
=>
{
state
.
appMainBlockClientHeight
=
height
;
},
}
};
const
actions
=
{
toggleSideBar
({
commit
})
{
commit
(
"TOGGLE_SIDEBAR"
);
...
...
@@ -60,12 +53,6 @@ const actions = {
setSize
({
commit
},
size
)
{
commit
(
"SET_SIZE"
,
size
);
},
setAppHeaderBlockCH
({
commit
},
height
)
{
commit
(
"SET_APPHEADERBLOCKCH"
,
height
);
},
setAppMainBlockCH
({
commit
},
height
)
{
commit
(
"SET_APPMAINBLOCKCH"
,
height
);
},
};
export
default
{
...
...
Please
register
or
login
to post a comment