LayoutContent.tsx 781 B

12345678910111213141516171819202122232425
  1. import { defineComponent } from 'vue';
  2. import { Layout } from 'ant-design-vue';
  3. import { RouterView } from 'vue-router';
  4. // hooks
  5. import { ContentEnum } from '/@/enums/appEnum';
  6. import { appStore } from '/@/store/modules/app';
  7. // import PageLayout from '/@/layouts/page/index';
  8. export default defineComponent({
  9. name: 'DefaultLayoutContent',
  10. setup() {
  11. return () => {
  12. const { getProjectConfig } = appStore;
  13. const { contentMode } = getProjectConfig;
  14. const wrapClass = contentMode === ContentEnum.FULL ? 'full' : 'fixed';
  15. return (
  16. <Layout.Content class={`layout-content ${wrapClass} `}>
  17. {() => <RouterView />}
  18. {/* <PageLayout class={`layout-content ${wrapClass} `} /> */}
  19. </Layout.Content>
  20. );
  21. };
  22. },
  23. });