feat: 整体布局搭建、新增不占为边框css变量

This commit is contained in:
wf 2024-04-02 21:00:21 +08:00
parent c25c76edad
commit 268cfce39d
8 changed files with 56 additions and 20 deletions

2
src/components.d.ts vendored
View File

@ -7,8 +7,6 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
Aaa: typeof import('./components/aaa.vue')['default']
HelloWorld: (typeof import("./components/HelloWorld.vue"))["default"]
RouterLink: typeof import('vue-router')['RouterLink'] RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView'] RouterView: typeof import('vue-router')['RouterView']
SvgIcon: typeof import('./components/SvgIcon/index.vue')['default'] SvgIcon: typeof import('./components/SvgIcon/index.vue')['default']

View File

@ -1,7 +0,0 @@
<template>
<div><a-button type="primary">Primary</a-button></div>
</template>
<script setup></script>
<style lang="scss" scoped></style>

View File

@ -2,15 +2,18 @@
<a-layout class="layout"> <a-layout class="layout">
<Aside /> <Aside />
<a-layout> <a-layout>
<a-layout-header>Header</a-layout-header> <Header />
<a-layout-content>Content</a-layout-content> <Main />
<Footer />
</a-layout> </a-layout>
<a-layout-footer>Footer</a-layout-footer>
</a-layout> </a-layout>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Aside from "@/layout/components/Aside/index.vue"; import Aside from "@/layout/components/Aside/index.vue";
import Header from "@/layout/components/Header/index.vue";
import Main from "@/layout/components/Main/index.vue";
import Footer from "@/layout/components/Footer/index.vue";
defineOptions({ name: "LayoutDefaults" }); defineOptions({ name: "LayoutDefaults" });
</script> </script>

View File

@ -34,7 +34,7 @@ const onCollapse = (type: boolean) => {
.aside { .aside {
height: 100vh; height: 100vh;
} }
//
.logo_head { .logo_head {
height: 60px; height: 60px;
display: flex; display: flex;
@ -53,10 +53,11 @@ const onCollapse = (type: boolean) => {
.layout_side { .layout_side {
height: calc(100% - 60px); height: calc(100% - 60px);
} .scrollbar {
.scrollbar {
height: 100%; height: 100%;
}
} }
//
:deep(.arco-scrollbar-thumb-direction-vertical .arco-scrollbar-thumb-bar) { :deep(.arco-scrollbar-thumb-direction-vertical .arco-scrollbar-thumb-bar) {
width: 4px; width: 4px;
margin-left: 8px; margin-left: 8px;

View File

@ -0,0 +1,22 @@
<template>
<a-layout-footer class="footer">
<div class="footer_title">dc admin by 兔子先森</div>
</a-layout-footer>
</template>
<script setup lang="ts"></script>
<style lang="scss" scoped>
.footer {
height: 40px;
box-sizing: border-box;
border-top: $border-1 solid $color-border-1;
display: flex;
align-items: center;
}
.footer_title {
text-align: center;
margin: 0 auto;
color: $color-text-4;
}
</style>

View File

@ -1,7 +1,13 @@
<template> <template>
<div>头部header</div> <a-layout-header class="header">Header</a-layout-header>
</template> </template>
<script setup lang="ts"></script> <script setup lang="ts"></script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
.header {
height: 60px;
box-sizing: border-box;
border-bottom: $border-1 solid $color-border-1;
}
</style>

View File

@ -1,7 +1,12 @@
<template> <template>
<div>主渲染窗口</div> <a-layout-content class="content">Content</a-layout-content>
</template> </template>
<script setup lang="ts"></script> <script setup lang="ts"></script>
<style lang="scss" scoped></style> <style lang="scss" scoped>
.content {
height: 100%;
box-shadow: $border-no-1;
}
</style>

View File

@ -9,6 +9,14 @@ $border-1: 1px; // 常规
$border-2: 2px; // 较粗 $border-2: 2px; // 较粗
$border-3: 3px; // $border-3: 3px; //
// 默认不占位边框
$border-no-1: inset 0 0 0 1px red;
$border-no-2: inset 0 0 0 1px cyan;
$border-no-3: inset 0 0 0 1px blue;
$border-no-4: inset 0 0 0 1px gold;
$border-no-5: inset 0 0 0 1px violet;
$border-no-6: inset 0 0 0 1px green;
// 设置全局主题色https://arco.design/vue/docs/token // 设置全局主题色https://arco.design/vue/docs/token
$color-primary: rgb(var(--primary-6)); // 主题色 $color-primary: rgb(var(--primary-6)); // 主题色
$color-success: rgb(var(--success-6)); // 成功色 $color-success: rgb(var(--success-6)); // 成功色