@@ -71,7 +71,7 @@ export interface ToastSlots {
|
71 | 71 | </script> |
72 | 72 | |
73 | 73 | <script setup lang="ts"> |
74 | | -import { ref, computed, onMounted, nextTick, useTemplateRef } from 'vue' |
| 74 | +import { ref, computed, onMounted, useTemplateRef } from 'vue' |
75 | 75 | import { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose, useForwardPropsEmits } from 'reka-ui' |
76 | 76 | import { reactivePick } from '@vueuse/core' |
77 | 77 | import { useAppConfig } from '#imports' |
@@ -107,13 +107,11 @@ const rootRef = useTemplateRef('rootRef')
|
107 | 107 | const height = ref(0) |
108 | 108 | |
109 | 109 | onMounted(() => { |
110 | | - if (!rootRef.value) { |
| 110 | + if (!rootRef.value?.$el?.getBoundingClientRect) { |
111 | 111 | return |
112 | 112 | } |
113 | 113 | |
114 | | - nextTick(() => { |
115 | | - height.value = rootRef.value?.$el?.getBoundingClientRect()?.height |
116 | | - }) |
| 114 | + height.value = rootRef.value.$el.getBoundingClientRect().height |
117 | 115 | }) |
118 | 116 | |
119 | 117 | defineExpose({ |
|