Accept Merge Request #1331: (feature/前端样式修改 -> develop)

Merge Request: 修改顶部下拉菜单

Created By: @黄焱
Reviewed By: @马广威
Approved By: @马广威 
Accepted By: @黄焱
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1331?initial=true
This commit is contained in:
黄焱
2024-09-20 16:31:57 +08:00
committed by Coding
2 changed files with 79 additions and 4 deletions

View File

@@ -1030,3 +1030,60 @@ div.dropdown-menu.bootstrap-datetimepicker-widget {
z-index: 9999 !important;
margin-top: 12px;
}
// 自定义的下拉
.o_menu_sections_fix{
display: flex!important;
align-items: center;
}
.custom_dropdown {
position: relative;
.title {
color: #1f2631;
padding: 0 12px;
line-height: var(--o-navbar-height);
margin: 0;
cursor: pointer;
display: block;
}
.custom_dropdown_fixed {
position: absolute;
top: var(--o-navbar-height);
z-index: 1000;
padding: 0.5rem 0;
margin: 0;
font-size: 1.08333333rem;
color: #495057;
text-align: left;
background-color: #FFFFFF;
box-shadow: 0 1rem 1.1rem rgba(0, 0, 0, 0.1);
border-radius: 0.25rem;
display: none;
a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: 400;
color: #495057;
text-align: inherit;
white-space: nowrap;
background-color: transparent;
border: 0;
&:hover {
color: #00005A !important;
background-color: #ebf0fd;
transition: all 0.3s linear;
}
}
}
&:hover {
.title {
background-color: rgba(0, 0, 0, 0.08);
transition: all .3s;
}
.custom_dropdown_fixed{
display: block;
}
}
}

View File

@@ -24,10 +24,28 @@
</div>
<!-- Current App Sections -->
<div class="d-none d-md-block">
<t t-if="currentAppSections.length"
t-call="web.NavBar.SectionsMenu">
<t t-set="sections" t-value="currentAppSections"/>
<div class="d-none d-md-block o_menu_sections_fix ">
<!-- <t t-if="currentAppSections.length"-->
<!-- t-call="web.NavBar.SectionsMenu">-->
<!-- <t t-set="sections" t-value="currentAppSections"/>-->
<!-- </t>-->
<t t-if="currentAppSections.length" >
<t t-foreach="currentAppSections" t-as="menu" t-key="menu.id">
<div class="custom_dropdown" >
<t t-if="menu.childrenTree.length">
<p class="title"><t t-esc="menu.name"></t> </p>
<div class="custom_dropdown_fixed">
<t t-foreach="menu.childrenTree" t-as="child" t-key="child.id">
<a t-attf-href="{{getMenuItemHref(child)}}"> <t t-esc="child.name"></t></a>
</t>
</div>
</t>
<t t-if="!menu.childrenTree.length">
<a class="title" t-attf-href="{{getMenuItemHref(menu)}}"> <t t-esc="menu.name"></t></a>
</t>
</div>
</t>
</t>
</div>
<div class="d-xs-block d-sm-block d-md-none">