Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
polysoft-nafmii
/
polysoft-h5
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 738097a3
authored
May 11, 2021
by
amateur
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加首页菜单模块
1 parent
0755e84a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
1 deletions
src/views/home/components/MenuModule.vue
src/views/home/index.vue
src/views/home/components/MenuModule.vue
0 → 100644
View file @
738097a
<
template
>
<section
class=
"menu-module"
>
<div
class=
"menu-module-item"
v-for=
"(item, idx) in datas"
:key=
"idx"
@
click=
"handleClickItem(item)"
>
<img
v-if=
"item.icon"
class=
"menu-icon"
:src=
"item.icon"
>
<div
v-else
class=
"menu-icon"
></div>
<span
v-if=
"item.name"
class=
"menu-name"
>
{{
item
.
name
}}
</span>
<div
v-else
class=
"menu-name white"
></div>
</div>
</section>
</
template
>
<
script
>
export
default
{
name
:
'MenuModule'
,
props
:
{
},
data
()
{
return
{
datas
:
[
{
id
:
1
,
name
:
''
,
icon
:
''
,
type
:
''
},
{
id
:
2
,
name
:
''
,
icon
:
''
,
type
:
''
},
{
id
:
3
,
name
:
''
,
icon
:
''
,
type
:
''
},
{
id
:
4
,
name
:
''
,
icon
:
''
,
type
:
''
},
{
id
:
5
,
name
:
''
,
icon
:
''
,
type
:
''
},
{
id
:
6
,
name
:
''
,
icon
:
''
,
type
:
''
},
{
id
:
7
,
name
:
''
,
icon
:
''
,
type
:
''
},
{
id
:
8
,
name
:
''
,
icon
:
''
,
type
:
''
},
]
}
},
methods
:
{
handleClickItem
(
item
)
{
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.white
{
background
:
#eee
;
}
.menu-module
{
display
:
flex
;
flex-wrap
:
wrap
;
width
:
100%
;
padding-top
:
5px
;
@
ModulePaddingTop
:
25px
;
.menu-module-item
{
padding-top
:
@
ModulePaddingTop
;
width
:
25%
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
@
IconSize
:
50px
;
.menu-icon
{
background
:
#eee
;
height
:
@
IconSize
;
width
:
@
IconSize
;
border-radius
:
calc
(
@
IconSize
/
2
);
}
.menu-name
{
display
:
block
;
margin-top
:
10px
;
line-height
:
20px
;
min-height
:
20px
;
min-width
:
90%
;
font-size
:
14px
;
text-align
:
center
;
color
:
#444444
;
}
}
}
</
style
>
\ No newline at end of file
src/views/home/index.vue
View file @
738097a
...
...
@@ -12,14 +12,16 @@
</nafm-header>
<main>
<HomeBanner
/>
<MenuModule
/>
</main>
</div>
</
template
>
<
script
>
import
HomeBanner
from
'./components/HomeBanner'
import
MenuModule
from
'./components/MenuModule'
export
default
{
name
:
"Home"
,
components
:
{
HomeBanner
},
components
:
{
HomeBanner
,
MenuModule
},
data
()
{
return
{};
},
...
...
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