Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigwood
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
bigwood
Commits
f33d1781
Commit
f33d1781
authored
Nov 02, 2022
by
youjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/bigwood
parents
272e85d6
364c9325
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
131 deletions
+36
-131
MainLayout.vue
src/layouts/MainLayout.vue
+36
-131
No files found.
src/layouts/MainLayout.vue
View file @
f33d1781
<
template
>
<q-layout
view=
"lhh lpR lFf"
>
<!--
<q-header
elevated
>
<q-toolbar>
<q-btn
flat
dense
round
icon=
"menu"
aria-label=
"Menu"
@
click=
"toggleLeftDrawer"
/>
<q-layout
view=
"lHh lpr lFf"
>
<q-toolbar-title>
Quasar App
</q-toolbar-title>
<q-header
reveal
bordered
class=
"bg-primary text-white"
>
<q-toolbar>
<q-btn
dense
flat
round
icon=
"menu"
@
click=
"toggleLeftDrawer"
/>
<div>
Quasar v
{{
$q
.
version
}}
</div>
</q-toolbar>
</q-header>
-->
<q-drawer
v-model=
"leftDrawerOpen"
show-if-above
>
<div
class=
"full-height column"
>
<div
class=
"flex q-px-md q-py-lg items-center"
>
<img
src=
"../assets/images/md-logo.png"
style=
"width: 40%"
/>
<q-badge
style=
"background: #cbcfe0; height: 18px"
class=
"q-ml-md"
transparent
>
Alpha
</q-badge>
</div>
<q-scroll-area
:thumb-style=
"scrollStyle.thumbStyle"
:bar-style=
"scrollStyle.barStyle"
class=
"full-height col"
>
<div
class=
"q-px-md navs-list"
>
<Navs
:menus=
"menuList"
></Navs>
</div>
</q-scroll-area>
<div
class=
"q-pa-md row items-center"
>
<q-avatar
rounded
size=
"40px"
>
<img
:src=
"user.userAvatar"
alt=
""
>
<q-toolbar-title>
<q-avatar>
<img
src=
"https://cdn.quasar.dev/logo-v2/svg/logo-mono-white.svg"
>
</q-avatar>
<div
class=
"q-ml-md pfb col"
style=
"font-size:20px"
>
{{
user
.
nickName
}}
</div>
<svg-icon
:size=
"24"
color=
"hover-g-p svg-icon"
icon=
"Navigation/Sign-out.svg"
tips=
"退出账户"
@
click=
"loginOut"
></svg-icon>
</div>
</div>
Title
</q-toolbar-title>
</q-toolbar>
</q-header>
<q-drawer
show-if-above
v-model=
"leftDrawerOpen"
side=
"left"
bordered
>
<!-- drawer content -->
</q-drawer>
<q-page-container
style=
"background: #f3f6f9"
>
<q-page-container>
<router-view
/>
</q-page-container>
<q-footer
bordered
class=
"bg-grey-8 text-white"
>
<q-toolbar>
<q-toolbar-title>
<q-avatar>
<img
src=
"https://cdn.quasar.dev/logo-v2/svg/logo-mono-white.svg"
>
</q-avatar>
<div>
Title
</div>
</q-toolbar-title>
</q-toolbar>
</q-footer>
</q-layout>
</
template
>
<
script
lang=
"ts"
>
const
linksList
=
[
{
MenuId
:
1
,
MenuName
:
'渠道管理'
,
MenuIcon
:
'school'
,
SubList
:
[
{
MenuId
:
8
,
MenuName
:
'我的渠道'
,
MenuIcon
:
'school'
,
MenuUrl
:
'/index'
},
{
MenuId
:
9
,
MenuName
:
'渠道市场'
,
MenuIcon
:
'school'
,
MenuUrl
:
'https://quasar.dev'
}
]
},
{
MenuId
:
2
,
MenuName
:
'数据看板'
,
MenuIcon
:
'code'
,
MenuUrl
:
'https://github.com/quasarframework'
},
{
MenuId
:
3
,
MenuName
:
'数据分析'
,
MenuIcon
:
'chat'
,
MenuUrl
:
'https://chat.quasar.dev'
},
{
MenuId
:
4
,
MenuName
:
'画像洞察'
,
MenuIcon
:
'record_voice_over'
,
MenuUrl
:
'https://forum.quasar.dev'
},
{
MenuId
:
5
,
MenuName
:
'客户线索'
,
MenuIcon
:
'rss_feed'
,
MenuUrl
:
'https://twitter.quasar.dev'
},
{
MenuId
:
6
,
MenuName
:
'数据管理'
,
MenuIcon
:
'public'
,
MenuUrl
:
'https://facebook.quasar.dev'
},
{
MenuId
:
7
,
MenuName
:
'平台管理'
,
MenuIcon
:
'favorite'
,
MenuUrl
:
'https://awesome.quasar.dev'
}
]
import
{
defineComponent
,
ref
,
reactive
,
provide
,
watch
}
from
'vue'
import
Navs
from
'../components/layout/navs.vue'
import
{
useRouter
}
from
'vue-router'
import
useScrollModule
from
'../module/scrollbar/scrollModule'
import
{
dispatchAction
,
getStoreGetter
}
from
'../store/utils'
import
{
UserGetter
}
from
'../store/modules/user/getters'
import
{
UserActionsType
}
from
'../store/modules/user/actions'
import
router
from
'../router'
export
default
defineComponent
({
name
:
'MainLayout'
,
<
script
>
import
{
ref
}
from
'vue'
components
:
{
Navs
},
export
default
{
setup
()
{
const
leftDrawerOpen
=
ref
(
false
)
setup
()
{
const
leftDrawerOpen
=
ref
(
true
)
const
useRouterCurrent
=
reactive
(
useRouter
())
let
currentRouterPath
=
ref
(
useRouterCurrent
.
currentRoute
.
path
)
let
{
scrollStyle
}
=
useScrollModule
()
provide
(
'currentPath'
,
currentRouterPath
)
watch
(
useRouterCurrent
,
o
=>
{
currentRouterPath
.
value
=
o
.
currentRoute
.
path
})
const
user
=
getStoreGetter
<
UserGetter
>
(
'user'
,
'getUser'
)
const
loginOut
=
()
=>
{
dispatchAction
<
UserActionsType
>
(
'user'
,
'setUserSignout'
,
null
)
router
.
push
({
path
:
'/login'
})
}
return
{
menuList
:
linksList
,
leftDrawerOpen
,
scrollStyle
,
user
,
loginOut
toggleLeftDrawer
()
{
leftDrawerOpen
.
value
=
!
leftDrawerOpen
.
value
}
}
}
})
</
script
>
<
style
>
.navs-list
.q-item
{
border-radius
:
8px
;
font-size
:
16px
!important
;
color
:
#788292
!important
;
}
.navs-list
.q-item
i
{
font-size
:
1.4rem
!important
;
}
</
s
tyle
>
</
s
cript
>
\ No newline at end of file
Write
Preview
Markdown
is supported
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