mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-23 16:33:11 +08:00
20 lines
467 B
Vue
20 lines
467 B
Vue
|
<template>
|
||
|
<component :is="layout">
|
||
|
<router-view />
|
||
|
</component>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import { defineComponent, ref, computed } from 'vue';
|
||
|
import { useRouter } from 'vue-router';
|
||
|
const defaultLayout = 'default';
|
||
|
export default defineComponent({
|
||
|
setup() {
|
||
|
const { currentRoute } = useRouter();
|
||
|
const layout = computed(() => `${currentRoute.value.meta.layout || defaultLayout}-layout`);
|
||
|
return {
|
||
|
layout,
|
||
|
};
|
||
|
},
|
||
|
});
|
||
|
</script>
|