|
@@ -8,15 +8,19 @@ import { layoutInjectionKey } from '@/injection'
|
|
|
import Action from '../header/action/index.vue'
|
|
|
|
|
|
const { layoutSlideDirection, mobileRightAsideWidth } = useInjection(layoutInjectionKey)
|
|
|
+
|
|
|
const mobileRightAsideRef = useTemplateRef<HTMLElement>('mobileRightAside')
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
- if (mobileRightAsideRef.value) mobileRightAsideWidth.value = mobileRightAsideRef.value.clientWidth
|
|
|
+ if (mobileRightAsideRef.value) {
|
|
|
+ mobileRightAsideWidth.value = mobileRightAsideRef.value.clientWidth
|
|
|
+ }
|
|
|
})
|
|
|
</script>
|
|
|
<template>
|
|
|
<div
|
|
|
ref="mobileRightAside"
|
|
|
- class="absolute top-0 right-0 h-svh p-4 transition-[translate]"
|
|
|
+ class="absolute top-0 right-0 h-svh py-4 pr-4 transition-[translate]"
|
|
|
:class="{
|
|
|
'translate-x-full': layoutSlideDirection !== 'left',
|
|
|
}"
|