Skip to content

Commit d9a648f

Browse files
committed
fix: fix changelog button on mobile
1 parent 6206b83 commit d9a648f

File tree

2 files changed

+50
-22
lines changed

2 files changed

+50
-22
lines changed

components/OneChangelogButton.vue

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,21 @@
55
>
66
<veui-button
77
ui="s"
8+
class="normal"
89
@click="open = !open"
910
>
1011
<veui-icon name="clock"/>
1112
{{ t('changelog') }}
1213
</veui-button>
14+
<div
15+
class="mobile"
16+
@click="open = !open"
17+
>
18+
<veui-icon
19+
class="collapsed-icon"
20+
name="clock"
21+
/>
22+
</div>
1323
<veui-drawer
1424
:title="t('changelog')"
1525
:open.sync="open"
@@ -50,28 +60,45 @@ export default {
5060
}
5161
</script>
5262

53-
<style scoped>
54-
.trigger {
55-
position: absolute;
56-
right: 60px;
57-
height: 36px;
58-
display: flex;
59-
align-items: center;
60-
}
63+
<style lang="stylus" scoped>
64+
.trigger
65+
position absolute
66+
right 60px
67+
height 36px
68+
display flex
69+
align-items center
6170
62-
.changelog {
63-
padding: 12px 16px;
64-
}
71+
.changelog
72+
padding 12px 16px
6573
66-
@media (max-width: 480px) {
67-
.trigger {
68-
top: 80px;
69-
right: 30px;
70-
height: auto;
71-
}
74+
.mobile
75+
display none
7276
73-
.drawer {
74-
--dls-drawer-width: calc(100vw - 16px);
75-
}
76-
}
77+
@media (max-width 480px)
78+
.normal
79+
display none
80+
81+
.mobile
82+
display flex
83+
align-items center
84+
justify-content center
85+
width 36px
86+
height 36px
87+
position fixed
88+
top 140px
89+
right 0
90+
border 1px solid #e2e6f0
91+
border-top-left-radius 4px
92+
border-bottom-left-radius 4px
93+
background-color #fff
94+
box-shadow 0 0 12px rgba(0, 0, 0, 0.1)
95+
font-size 20px
96+
97+
.trigger
98+
top 80px
99+
right 30px
100+
height auto
101+
102+
.drawer
103+
--dls-drawer-width calc(100vw - 16px)
77104
</style>

components/OneToc.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ export default {
9595
9696
&.expanded
9797
transform translateX(0)
98+
box-shadow 0 0 36px rgba(0, 0, 0, 0.1)
9899
99100
.toggle
100101
z-index -1
@@ -112,7 +113,7 @@ export default {
112113
background-color #fff
113114
box-shadow 0 0 12px rgba(0, 0, 0, 0.1)
114115
font-size 20px
115-
transition transform 0.3s, opacity 0.3s
116+
z-index 1
116117
117118
&::before
118119
content ""

0 commit comments

Comments
 (0)