Skip to content

Commit

Permalink
Update demo-block.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
kohaiy authored Jan 14, 2024
1 parent 250e0ec commit 073970b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/src/comp/demo-block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,13 @@ export default {
handleChangeExpand() {
this.isExpanded = !this.isExpanded
if (!this.isExpanded && this.$refs.meta) {
const height = this.$refs.meta.getBoundingClientRect().height
let height = 0
if (this.fixedControl)
height = window.innerHeight - (this.$refs.meta.getBoundingClientRect().top ?? 0) - 44 - 40
else
height = this.$refs.meta.getBoundingClientRect().height
window.scrollTo({
top: window.scrollY - height,
behavior: 'instant',
Expand Down

0 comments on commit 073970b

Please sign in to comment.