Skip to content

Commit f1058e2

Browse files
author
潘卓然 Parn Deedlit
authored
Merge pull request #39 from MapGIS/website
解决了示例网站在不同窗口大小下菜单栏显示问题
2 parents de862c5 + 44c368c commit f1058e2

File tree

4 files changed

+64
-15
lines changed

4 files changed

+64
-15
lines changed

website/src/components/IconFont/iconfont.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/src/views/layout/components/Header/Header.vue

Lines changed: 58 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@
1414
</span>
1515
</div>
1616
</router-link>
17-
<div class="mapgis-webclient-menu">
18-
<el-popover
17+
<IconFont
18+
:style="style"
19+
type="iconicon_commonly_barmenu"
20+
class="mapgis-webclient-menu-icon"
21+
@click="isShowMenu = !isShowMenu"
22+
/>
23+
<div :class="['mapgis-webclient-menu',{'is-show':isShowMenu}]">
24+
<div class="mapgis-webclient-nav">
25+
<el-popover
1926
v-for="(h,i) in mobile ? mobileHeaders : headers"
2027
:key="i"
2128
placement="top-start"
@@ -54,6 +61,7 @@
5461
>{{h.title}}</el-button>
5562
</el-popover>
5663
</div>
64+
</div>
5765
</div>
5866
</div>
5967
</template>
@@ -82,6 +90,12 @@ export default {
8290
subheaders: [],
8391
mobileHeaders: [],
8492
mobileSubheaders: [],
93+
isShowMenu: false,
94+
style: {
95+
fontSize: '24px',
96+
color: '#FFFFFF',
97+
lineHeight: '72px'
98+
}
8599
};
86100
},
87101
created () {
@@ -205,26 +219,57 @@ export default {
205219
}
206220
}
207221
208-
.mapgis-webclient-menu {
209-
width: fit-content;
210-
margin-right: 92px;
211-
height: 72px;
212-
align-items: center;
222+
.mapgis-webclient-menu-icon {
213223
float: right;
224+
height: 72px;
225+
margin-right: 48px;
226+
cursor: pointer;
227+
display: none;
228+
229+
@media screen and (max-width: 1220px) {
230+
display: block;
231+
}
232+
}
233+
234+
.mapgis-webclient-menu {
235+
z-index: 200;
236+
position: relative;
214237
display: flex;
238+
align-items: center;
239+
240+
.mapgis-webclient-nav {
241+
margin-left: auto;
242+
margin-right: 92px;
243+
}
244+
245+
@media screen and (max-width: 1220px) {
246+
width: 100%;
247+
flex-wrap: wrap;
248+
background-color: rgba(37, 45, 69, .5);
249+
display: none;
250+
251+
&.is-show {
252+
display: flex;
253+
}
254+
}
215255
216256
span {
217257
width: fit-content;
218-
// height: 16px;
219-
margin: 0px 6px;
220-
padding: 0px 2px;
221-
// margin-left: 12.5px;
258+
height: 72px;
259+
// margin: 0px 6px;
260+
padding: 0px 4px;
261+
// margin-let: 12.5px;
222262
font-size: 16px;
223263
font-family: Microsoft YaHei;
224264
font-weight: 500;
225-
text-align: right;
265+
text-align: center;
226266
color: rgba(255, 255, 255, 1);
227-
line-height: 20px;
267+
line-height: 72px;
268+
269+
.el-button {
270+
padding: 0;
271+
border-width: 0;
272+
}
228273
}
229274
230275
span:hover {

website/src/views/layout/components/Header/Menu.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ export default {
137137
<style lang="scss">
138138
.header-menu-wrapper {
139139
display: flex;
140+
flex-wrap: wrap;
140141
width: fit-content;
142+
max-width: 100vw;
143+
max-height: 60vh;
144+
overflow: auto;
141145
.menu-badge {
142146
/* padding-top: -30px !important;
143147
padding-right: -30px !important;

website/src/views/welcome/home.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ $margin-left: 80px;
260260
}
261261
.home-header {
262262
position: absolute;
263-
z-index: 9999;
263+
z-index: 100;
264264
}
265265
h1 {
266266
height: 36px;

0 commit comments

Comments
 (0)