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:43:44 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4d45027746f36035a1068f9fc74bb07c1e976b95
4d450277
1 parent
8bffd73e
modify
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
28 deletions
src/layout/index.vue
src/layout/mixin/ResizeHandler.js
src/store/getters.js
src/store/modules/app.js
src/layout/index.vue
View file @
4d45027
...
...
@@ -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 @
4d45027
...
...
@@ -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
});
}
...
...
@@ -24,9 +23,6 @@ export default {
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/getters.js
View file @
4d45027
...
...
@@ -2,8 +2,6 @@ const getters = {
sidebar
:
(
state
)
=>
state
.
app
.
sidebar
,
size
:
(
state
)
=>
state
.
app
.
size
,
device
:
(
state
)
=>
state
.
app
.
device
,
appHeaderBlockClientHeight
:
(
state
)
=>
state
.
app
.
headerBlockClientHeight
,
appMainBlockClientHeight
:
(
state
)
=>
state
.
app
.
appMainBlockClientHeight
,
visitedViews
:
(
state
)
=>
state
.
tagsView
.
visitedViews
,
cachedViews
:
(
state
)
=>
state
.
tagsView
.
cachedViews
,
token
:
(
state
)
=>
state
.
user
.
token
,
...
...
src/store/modules/app.js
View file @
4d45027
...
...
@@ -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,12 +38,6 @@ 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
=
{
...
...
@@ -61,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