@@ -9,7 +9,6 @@ import { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'
99import { makeLocationProps } from '@/composables/location'
1010import { useProxiedModel } from '@/composables/proxiedModel'
1111import { useResizeObserver } from '@/composables/resizeObserver'
12- import { useToggleScope } from '@/composables/toggleScope'
1312import { makeTransitionProps , MaybeTransition } from '@/composables/transition'
1413
1514// Utilities
@@ -49,7 +48,6 @@ export const VFab = genericComponent()({
4948 setup ( props , { slots } ) {
5049 const model = useProxiedModel ( props , 'modelValue' )
5150 const height = shallowRef ( 56 )
52- const layoutItemStyles = ref ( )
5351
5452 const { resizeRef } = useResizeObserver ( entries => {
5553 if ( ! entries . length ) return
@@ -70,20 +68,14 @@ export const VFab = genericComponent()({
7068 return props . location ?. split ( ' ' ) [ 1 ] ?? 'end'
7169 } )
7270
73- useToggleScope ( ( ) => props . app , ( ) => {
74- const layout = useLayoutItem ( {
75- id : props . name ,
76- order : computed ( ( ) => parseInt ( props . order , 10 ) ) ,
77- position,
78- layoutSize : computed ( ( ) => props . layout ? height . value + 24 : 0 ) ,
79- elementSize : computed ( ( ) => height . value + 24 ) ,
80- active : computed ( ( ) => props . app && model . value ) ,
81- absolute : toRef ( ( ) => props . absolute ) ,
82- } )
83-
84- watchEffect ( ( ) => {
85- layoutItemStyles . value = layout . layoutItemStyles . value
86- } )
71+ const { layoutItemStyles } = useLayoutItem ( {
72+ id : props . name ,
73+ order : computed ( ( ) => parseInt ( props . order , 10 ) ) ,
74+ position,
75+ layoutSize : computed ( ( ) => props . layout ? height . value + 24 : 0 ) ,
76+ elementSize : computed ( ( ) => height . value + 24 ) ,
77+ active : computed ( ( ) => props . app && model . value ) ,
78+ absolute : toRef ( ( ) => props . absolute ) ,
8779 } )
8880
8981 const vFabRef = ref ( )
@@ -108,7 +100,7 @@ export const VFab = genericComponent()({
108100 ] }
109101 style = { [
110102 props . app
111- ? { ... layoutItemStyles . value }
103+ ? layoutItemStyles . value
112104 : {
113105 height : props . absolute
114106 ? '100%'
0 commit comments