shared-ritm 1.2.22 → 1.2.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.2.22",
3
+ "version": "1.2.23",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -19,7 +19,7 @@
19
19
  </template>
20
20
 
21
21
  <script lang="ts" setup>
22
- import { computed, defineProps, onBeforeUnmount, onMounted, ref } from 'vue'
22
+ import { computed, defineProps, nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
23
23
  import AppLoader from '@/common/app-loader/index.vue'
24
24
  interface LayoutProps {
25
25
  logged: boolean
@@ -48,12 +48,13 @@ function checkPaddingLeft() {
48
48
  const el = document.querySelector('.q-page-container') as HTMLElement | null
49
49
 
50
50
  if (el) {
51
- const observer = new ResizeObserver(() => {
52
- console.log(window.getComputedStyle(el).paddingLeft)
53
- hasPaddingLeft.value = window.getComputedStyle(el).paddingLeft !== '0px'
51
+ nextTick(() => {
52
+ const observer = new ResizeObserver(() => {
53
+ hasPaddingLeft.value = window.getComputedStyle(el).paddingLeft !== '0px'
54
+ })
55
+ observer.observe(el)
56
+ onBeforeUnmount(() => observer.disconnect())
54
57
  })
55
- observer.observe(el)
56
- onBeforeUnmount(() => observer.disconnect())
57
58
  }
58
59
  }
59
60