Skip to content

Commit 25095ba

Browse files
committed
fix drawer: next Tick computed scroll height
1 parent 9c4ba61 commit 25095ba

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

example/pages/drawer/custom.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,4 @@
8181
.cube-drawer-item_active
8282
color: #fc9153
8383
background-color: transparent
84-
.cube-drawer-panel
85-
overflow: hidden
8684
</style>

example/pages/drawer/default.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,4 @@
6969
left: 0
7070
bottom: 0
7171
width: 100%
72-
.cube-drawer-panel
73-
overflow: hidden
7472
</style>

src/components/drawer/drawer-panel.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
this.scrollToTop()
4747
},
4848
isVisible() {
49-
this.refresh()
49+
this.$nextTick(() => {
50+
this.refresh()
51+
})
5052
}
5153
},
5254
mounted() {
@@ -84,6 +86,7 @@
8486
height: 100%
8587
flex: 1
8688
width: 170px
89+
overflow: hidden
8790
background-color: $drawer-panel-bgc
8891
box-shadow: 0 1px 2px rgba(0, 0, 0, .2)
8992
+ .cube-drawer-panel

0 commit comments

Comments
 (0)