Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 19eea5ba
authored
May 25, 2021
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新版菜单调整基本完成
1 parent
68cde27e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
59 additions
and
24 deletions
linkwe-ui/src/layout/components/AppMain.vue
linkwe-ui/src/layout/components/Hamburger/index.vue
linkwe-ui/src/layout/components/Navbar.vue
linkwe-ui/src/layout/components/View.vue
linkwe-ui/src/layout/index.vue
linkwe-ui/src/router/index.js
linkwe-ui/src/store/modules/permission.js
linkwe-ui/src/styles/sidebar.scss
linkwe-ui/src/styles/variables.scss
linkwe-ui/src/layout/components/AppMain.vue
View file @
19eea5b
<
style
lang=
"scss"
scoped
>
.page
{
padding
:
16px
24px
24px
;
}
</
style
>
<
template
>
<section
class=
"app-main"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
...
...
@@ -34,7 +29,7 @@ export default {
width
:
100%
;
position
:
relative
;
overflow
:
auto
;
background-color
:
#fff
;
//
background-color
:
#fff
;
}
.fixed-header
+
.app-main
{
...
...
linkwe-ui/src/layout/components/Hamburger/index.vue
View file @
19eea5b
<
template
>
<div
style=
"padding
: 0
15px;display: inline-block;"
@
click=
"toggleClick"
>
<div
style=
"padding
-right:
15px;display: inline-block;"
@
click=
"toggleClick"
>
<svg
:class=
"
{ 'is-active': $store.state.app.sidebar.opened }"
class="hamburger"
...
...
@@ -22,7 +22,7 @@ export default {
$route
(
route
)
{
// if you go to the redirect page, do not update the breadcrumbs
if
(
route
.
name
==
'首页'
)
{
// this.$store.state.app.sidebar.opened = false
this
.
$store
.
state
.
app
.
sidebar
.
opened
=
0
}
},
},
...
...
linkwe-ui/src/layout/components/Navbar.vue
View file @
19eea5b
...
...
@@ -197,6 +197,7 @@ export default {
margin
:
0
20px
;
flex
:
none
;
position
:
relative
;
cursor
:
pointer
;
&.
active
::
after
{
content
:
''
;
display
:
inline-block
;
...
...
linkwe-ui/src/layout/components/View.vue
0 → 100644
View file @
19eea5b
<
template
>
<router-view></router-view>
</
template
>
<
script
>
export
default
{}
</
script
>
<
style
></
style
>
linkwe-ui/src/layout/index.vue
View file @
19eea5b
...
...
@@ -12,8 +12,14 @@
<div
class=
"main main-size"
>
<sidebar
v-if=
"$route.name !== '首页'"
class=
"sidebar-container"
/>
<div
class=
"main-container"
>
<hamburger
id=
"hamburger-container"
class=
"hamburger-container"
/>
<breadcrumb
id=
"breadcrumb-container"
class=
"breadcrumb-container"
/>
<div
v-show=
"$route.name !== '首页'"
>
<hamburger
id=
"hamburger-container"
class=
"hamburger-container"
/>
<span
class=
"slogan"
>
仟微科技 |
</span>
<breadcrumb
id=
"breadcrumb-container"
class=
"breadcrumb-container"
/>
</div>
<!--
<div
:class=
"
{ 'fixed-header': fixedHeader }">
<navbar
/>
...
...
@@ -99,6 +105,12 @@ export default {
.main-wrap
{
height
:
calc
(
100vh
-
58px
);
background
:
#eee
;
.main
{
height
:
100%
;
padding
:
10px
;
display
:
flex
;
align-items
:
stretch
;
}
}
}
...
...
@@ -138,4 +150,9 @@ export default {
background
:
rgba
(
0
,
0
,
0
,
0.025
);
}
}
.slogan
{
font-size
:
22px
;
color
:
#999
;
vertical-align
:
middle
;
}
</
style
>
linkwe-ui/src/router/index.js
View file @
19eea5b
...
...
@@ -38,6 +38,11 @@ export const constantRoutes = [
],
},
{
path
:
''
,
redirect
:
'/index'
,
hidden
:
true
,
},
{
path
:
'/index'
,
component
:
Layout
,
redirect
:
'/index'
,
...
...
linkwe-ui/src/store/modules/permission.js
View file @
19eea5b
import
{
constantRoutes
}
from
'@/router'
import
{
getRouters
}
from
'@/api/menu'
import
Layout
from
'@/layout/index'
import
View
from
'@/layout/components/View'
const
permission
=
{
state
:
{
...
...
@@ -30,7 +31,7 @@ const permission = {
}
// 遍历后台传来的路由字符串,转换为组件对象
function
filterAsyncRouter
(
asyncRouterMap
)
{
function
filterAsyncRouter
(
asyncRouterMap
,
level
)
{
return
asyncRouterMap
.
filter
((
route
)
=>
{
if
(
route
.
component
)
{
// Layout组件特殊处理
...
...
@@ -38,13 +39,17 @@ function filterAsyncRouter(asyncRouterMap) {
if
(
route
.
redirect
===
'noRedirect'
&&
route
.
children
.
length
)
{
route
.
redirect
=
route
.
path
+
'/'
+
route
.
children
[
0
].
path
}
route
.
component
=
Layout
if
(
level
===
2
)
{
route
.
component
=
View
}
else
{
route
.
component
=
Layout
}
}
else
{
route
.
component
=
loadView
(
route
.
component
)
}
}
if
(
route
.
children
!=
null
&&
route
.
children
&&
route
.
children
.
length
)
{
route
.
children
=
filterAsyncRouter
(
route
.
children
)
route
.
children
=
filterAsyncRouter
(
route
.
children
,
2
)
}
return
true
})
...
...
linkwe-ui/src/styles/sidebar.scss
View file @
19eea5b
#app
{
.main-container
{
min-height
:
100%
;
transition
:
margin-left
0
.28s
;
margin-left
:
$sideBarWidth
;
transition
:
all
0
.28s
;
margin-left
:
40px
;
position
:
relative
;
flex
:
auto
;
overflow
:
hidden
;
}
.sidebar-container
{
transition
:
width
0
.28s
;
width
:
$sideBarWidth
!
important
;
background-color
:
$menuBg
;
height
:
calc
(
100%
-
58px
);
position
:
fixed
;
font-size
:
0px
;
bottom
:
0
;
z-index
:
1001
;
overflow
:
hidden
;
flex
:
none
;
box-shadow
:
0px
2px
2px
0px
rgba
(
228
,
228
,
228
,
0
.35
);
border-radius
:
10px
;
.el-menu-item.is-active
{
color
:
#fff
!
important
;
background-color
:
$menuActiveBg
!
important
;
border-right
:
2px
solid
#0079de
;
}
// reset element-ui css
...
...
@@ -91,11 +94,11 @@
.hideSidebar
{
.sidebar-container
{
width
:
54px
!
important
;
width
:
0
!
important
;
}
.main-container
{
margin-left
:
54px
;
margin-left
:
0
;
}
.submenu-title-noDropdown
{
...
...
linkwe-ui/src/styles/variables.scss
View file @
19eea5b
...
...
@@ -15,12 +15,12 @@ $menuActiveText: #333;
$subMenuActiveText
:
#333
;
// https://github.com/ElemeFE/element/issues/12951
$menuBg
:
#fff
;
$menuActiveBg
:
#
4ca1e8
;
$menuHover
:
#
4ca1e8
;
$menuActiveBg
:
#
fafafa
;
$menuHover
:
#
fafafa
;
$subMenuBg
:
#fff
;
$subMenuActiveBg
:
#
4ca1e8
;
$subMenuHover
:
#
4ca1e8
;
$subMenuActiveBg
:
#
fafafa
;
$subMenuHover
:
#
fafafa
;
$sideBarWidth
:
200px
;
...
...
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