12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <template>
- <div class="layout">
- <Header class="header" />
- <div class="container">
- <Slide class="slide" />
- <div class="content" ref="drawEle">
- <Renderer v-if="drawEle" ref="draw" />
- </div>
- </div>
- </div>
- </template>
- <script lang="ts" setup>
- import { Header } from "./header/";
- import { ref } from "vue";
- import { Slide } from "./slide";
- import { DrawExpose, Renderer } from "@/index.ts";
- import { installDraw } from "./use-draw.ts";
- const drawEle = ref<HTMLDivElement | null>(null);
- const draw = ref<DrawExpose>();
- installDraw(draw);
- </script>
- <style lang="scss" scoped>
- @use '../styles/global';
- .layout {
- display: flex;
- flex-direction: column;
- align-items: stretch;
- height: 100vh;
- background: #f0f2f5;
- .header {
- height: global.$headerSize;
- }
- .container {
- position: relative;
- width: 100%;
- height: calc(100% - #{global.$headerSize});
- }
- .slide {
- position: absolute;
- left: 0;
- width: global.$slideSize;
- overflow-y: auto;
- height: 100%;
- top: 0;
- background: #fff;
- z-index: 1;
- }
- .content {
- position: absolute;
- inset: 0;
- }
- }
- </style>
|