Skip to content

Commit a1d7f87

Browse files
committed
(fix) footer height ref
1 parent 9668ede commit a1d7f87

File tree

5 files changed

+33
-6
lines changed

5 files changed

+33
-6
lines changed

src/lib/Room/RoomFooter/RoomEmojis/RoomEmojis.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div
44
v-if="filteredEmojis.length"
55
class="vac-emojis-container"
6-
:style="{ bottom: `${$parent.$refs.roomFooter.clientHeight}px` }"
6+
:style="{ bottom: `${footerHeight}px` }"
77
>
88
<div
99
v-for="(emoji, index) in filteredEmojis"
@@ -37,6 +37,12 @@ export default {
3737
}
3838
},
3939
40+
computed: {
41+
footerHeight() {
42+
return document.getElementById('room-footer').clientHeight
43+
}
44+
},
45+
4046
watch: {
4147
filteredEmojis() {
4248
this.activeItem = 0

src/lib/Room/RoomFooter/RoomFiles/RoomFiles.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div
44
v-if="files.length"
55
class="vac-room-files-container"
6-
:style="{ bottom: `${$parent.$refs.roomFooter.clientHeight}px` }"
6+
:style="{ bottom: `${footerHeight}px` }"
77
>
88
<div class="vac-files-box">
99
<div v-for="(file, i) in files" :key="i">
@@ -42,6 +42,12 @@ export default {
4242
files: { type: Array, required: true }
4343
},
4444
45-
emits: ['remove-file', 'reset-message']
45+
emits: ['remove-file', 'reset-message'],
46+
47+
computed: {
48+
footerHeight() {
49+
return document.getElementById('room-footer').clientHeight
50+
}
51+
}
4652
}
4753
</script>

src/lib/Room/RoomFooter/RoomMessageReply/RoomMessageReply.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div
44
v-if="messageReply"
55
class="vac-reply-container"
6-
:style="{ bottom: `${$parent.$refs.roomFooter.clientHeight}px` }"
6+
:style="{ bottom: `${footerHeight}px` }"
77
>
88
<div class="vac-reply-box">
99
<div class="vac-reply-info">
@@ -100,6 +100,9 @@ export default {
100100
emits: ['reset-message'],
101101
102102
computed: {
103+
footerHeight() {
104+
return document.getElementById('room-footer').clientHeight
105+
},
103106
firstFile() {
104107
return this.messageReply.files?.length ? this.messageReply.files[0] : {}
105108
},

src/lib/Room/RoomFooter/RoomTemplatesText/RoomTemplatesText.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div
44
v-if="filteredTemplatesText.length"
55
class="vac-template-container vac-app-box-shadow"
6-
:style="{ bottom: `${$parent.$refs.roomFooter.clientHeight}px` }"
6+
:style="{ bottom: `${footerHeight}px` }"
77
>
88
<div
99
v-for="(template, index) in filteredTemplatesText"
@@ -44,6 +44,12 @@ export default {
4444
}
4545
},
4646
47+
computed: {
48+
footerHeight() {
49+
return document.getElementById('room-footer').clientHeight
50+
}
51+
},
52+
4753
watch: {
4854
filteredTemplatesText() {
4955
this.activeItem = 0

src/lib/Room/RoomFooter/RoomUsersTag/RoomUsersTag.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div
44
v-if="filteredUsersTag.length"
55
class="vac-tags-container"
6-
:style="{ bottom: `${$parent.$refs.roomFooter.clientHeight}px` }"
6+
:style="{ bottom: `${footerHeight}px` }"
77
>
88
<div
99
v-for="(user, index) in filteredUsersTag"
@@ -46,6 +46,12 @@ export default {
4646
}
4747
},
4848
49+
computed: {
50+
footerHeight() {
51+
return document.getElementById('room-footer').clientHeight
52+
}
53+
},
54+
4955
watch: {
5056
filteredUsersTag() {
5157
this.activeItem = 0

0 commit comments

Comments
 (0)