sk_fems_ui commit
This commit is contained in:
24
layouts/dynamicLayout.vue
Normal file
24
layouts/dynamicLayout.vue
Normal file
@ -0,0 +1,24 @@
|
||||
<template>
|
||||
<component :is="layout">
|
||||
<slot />
|
||||
</component>
|
||||
</template>
|
||||
<script>
|
||||
import DefaultLayout from '~/layouts/default';
|
||||
import FullSizeLayout from '~/layouts/landing';
|
||||
const isLocal = window.location.host == 'localhost:3000';
|
||||
export default {
|
||||
name: 'layout',
|
||||
components: {
|
||||
DefaultLayout,
|
||||
FullSizeLayout,
|
||||
},
|
||||
setup(props, { root }) {
|
||||
const layout = isLocal ? 'DefaultLayout' : 'FullSizeLayout';
|
||||
// computed(() => root.$route.meta.layout || "DefaultLayout");
|
||||
return {
|
||||
layout,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
Reference in New Issue
Block a user