|
@@ -6,7 +6,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" name="layout">
|
|
|
-import { computed, type Component, onMounted, onUnmounted } from 'vue'
|
|
|
+import { computed, type Component, onMounted, onUnmounted, nextTick } from 'vue'
|
|
|
import { LayoutType } from '@/store/interface'
|
|
|
import useStore from '@/store'
|
|
|
// import RightPanel from '@/components/RightPanel/index-old.vue'
|
|
@@ -24,10 +24,11 @@ const LayoutComponents: Record<LayoutType, Component> = {
|
|
|
top: LayoutTop
|
|
|
}
|
|
|
const { setting, app } = useStore()
|
|
|
-const layout = computed(() => (app.isMaxM ? 'left' : setting.layout))
|
|
|
+const layout = computed(() => (app.isMobile ? 'left' : setting.layout))
|
|
|
const showSettings = computed(() => setting.showSettings)
|
|
|
onMounted(() => {
|
|
|
window.addEventListener('resize', app.updateDevice)
|
|
|
+ nextTick(app.updateDevice)
|
|
|
})
|
|
|
|
|
|
onUnmounted(() => {
|