3
0

index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <!-- <div style="position: fixed; width: 100%; height: 100%; top: 0; left: 0; background-color: yellow"></div> -->
  3. <Layout :class="prefixCls" v-bind="lockEvents">
  4. <LayoutFeatures />
  5. <LayoutHeader />
  6. <!-- <SystemSelect /> -->
  7. <SimpleMap />
  8. <Layout :class="[layoutClass]">
  9. <LayoutSideBar />
  10. <Layout :class="`${prefixCls}-main`">
  11. <MultipleTabs />
  12. <LayoutContent />
  13. <LayoutFooter />
  14. </Layout>
  15. </Layout>
  16. </Layout>
  17. </template>
  18. <script lang="ts">
  19. import { defineComponent, computed, unref } from 'vue';
  20. import { Layout } from 'ant-design-vue';
  21. import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
  22. import LayoutHeader from './header/index.vue';
  23. import MultipleTabs from './tabs/index.vue';
  24. import LayoutContent from './content/index.vue';
  25. import LayoutSideBar from './sider/index.vue';
  26. // import SystemSelect from './feature/SystemSelect.vue';
  27. import SimpleMap from './feature/SimpleMap.vue';
  28. // import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
  29. import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
  30. import { useDesign } from '/@/hooks/web/useDesign';
  31. import { useLockPage } from '/@/hooks/web/useLockPage';
  32. // import { useAppInject } from '/@/hooks/web/useAppInject';
  33. export default defineComponent({
  34. name: 'DefaultLayout',
  35. components: {
  36. LayoutFeatures: createAsyncComponent(() => import('/@/layouts/default/feature/index.vue')),
  37. LayoutFooter: createAsyncComponent(() => import('/@/layouts/default/footer/index.vue')),
  38. LayoutHeader,
  39. LayoutContent,
  40. LayoutSideBar,
  41. MultipleTabs,
  42. Layout,
  43. // SystemSelect,
  44. SimpleMap,
  45. },
  46. setup() {
  47. const { prefixCls } = useDesign('default-layout');
  48. // const { getIsMobile } = useAppInject();
  49. // const { getShowFullHeaderRef } = useHeaderSetting();
  50. const { getShowSidebar, getIsMixSidebar, getShowMenu } = useMenuSetting();
  51. // Create a lock screen monitor
  52. const lockEvents = useLockPage();
  53. const layoutClass = computed(() => {
  54. let cls: string[] = ['ant-layout'];
  55. if (unref(getIsMixSidebar) || unref(getShowMenu)) {
  56. cls.push('ant-layout-has-sider');
  57. }
  58. return cls;
  59. });
  60. return {
  61. getShowSidebar,
  62. prefixCls,
  63. getIsMixSidebar,
  64. layoutClass,
  65. lockEvents,
  66. };
  67. },
  68. });
  69. </script>
  70. <style lang="less">
  71. @prefix-cls: ~'@{namespace}-default-layout';
  72. .@{prefix-cls} {
  73. display: flex;
  74. width: 100%;
  75. min-height: 100%;
  76. flex-direction: column;
  77. >.ant-layout {
  78. height: 0;
  79. margin: 10px;
  80. background-color: transparent;
  81. position: relative;
  82. z-index: @layout-basic-z-index;
  83. }
  84. &-main {
  85. width: 100%;
  86. border-top-right-radius: 4px;
  87. border-bottom-right-radius: 4px;
  88. // background-color: #aaaaaa32;
  89. // border: 1px solid @white;
  90. box-shadow: inset 0 0 5px 0 @white;
  91. background: rgba(255, 255, 255, 0.2);
  92. backdrop-filter: blur(14px);
  93. // -webkit-backdrop-filter: blur(10px);
  94. // 代码逻辑说明:【issues/8709】LayoutContent样式多出1px
  95. // margin-left: 1px;
  96. }
  97. }
  98. </style>