vben
authored
|
1
|
import { computed, defineComponent, unref } from 'vue';
|
vben
authored
|
2
|
import { Layout } from 'ant-design-vue';
|
vben
authored
|
3
4
|
import { FullLoading } from '/@/components/Loading/index';
|
vben
authored
|
5
6
|
import { RouterView } from 'vue-router';
|
|
7
8
9
10
11
|
import { ContentEnum } from '/@/enums/appEnum';
import { appStore } from '/@/store/modules/app';
export default defineComponent({
name: 'DefaultLayoutContent',
setup() {
|
vben
authored
|
12
13
14
15
|
const getProjectConfigRef = computed(() => {
return appStore.getProjectConfig;
});
|
|
16
|
return () => {
|
vben
authored
|
17
18
|
const { contentMode, openPageLoading } = unref(getProjectConfigRef);
const { getPageLoading } = appStore;
|
|
19
20
|
const wrapClass = contentMode === ContentEnum.FULL ? 'full' : 'fixed';
return (
|
vben
authored
|
21
22
23
24
25
26
27
28
|
<div class={[`default-layout__main`]}>
{openPageLoading && (
<FullLoading class={[`default-layout__loading`, !getPageLoading && 'hidden']} />
)}
<Layout.Content class={`layout-content ${wrapClass} `}>
{() => <RouterView />}
</Layout.Content>
</div>
|
|
29
30
31
32
|
);
};
},
});
|