Добавила скролл по условию

This commit is contained in:
Daria Golova
2022-10-20 19:26:51 +03:00
parent e6335c09b4
commit f08cc48415
2 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
<template lang="pug">
.calendar-background-wrapper.flex.flex-col(
ref="backgroundWrapper"
:class="addScroll"
)
calendar-column(
v-for="(owner, index) in columnInformation.owners"
@@ -54,6 +55,11 @@ export default {
backgroundHeight() {
return (this.hoursArray.length - 1) * this.pixelsPerHour + 48;
},
addScroll() {
return {
scroll: this.ownersArrayLength > 3,
};
},
},
methods: {
calculateColumnPosition(elemIndex) {
@@ -82,10 +88,12 @@ export default {
</script>
<style lang="sass" scoped>
.scroll
overflow-x: scroll
.calendar-background-wrapper
width: 100%
position: relative
overflow-x: scroll
.header
height: 48px