feat: 添加bbs前端搭建
This commit is contained in:
21
Yi.BBS.Vue3/src/layout/AppBody.vue
Normal file
21
Yi.BBS.Vue3/src/layout/AppBody.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
<template class="back-color">
|
||||
<div class="body-main"> 身体 <RouterView /></div>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.back-color{
|
||||
|
||||
|
||||
}
|
||||
|
||||
.body-main{
|
||||
min-height: 10rem;
|
||||
min-width: 10rem;
|
||||
background-color:#F0F2F5;
|
||||
}
|
||||
</style>
|
||||
32
Yi.BBS.Vue3/src/layout/AppHeader.vue
Normal file
32
Yi.BBS.Vue3/src/layout/AppHeader.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<el-menu
|
||||
:default-active="activeIndex"
|
||||
class="el-menu-demo"
|
||||
mode="horizontal"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item index="1">Processing Center</el-menu-item>
|
||||
<el-sub-menu index="2">
|
||||
<template #title>Workspace</template>
|
||||
<el-menu-item index="2-1">item one</el-menu-item>
|
||||
<el-menu-item index="2-2">item two</el-menu-item>
|
||||
<el-menu-item index="2-3">item three</el-menu-item>
|
||||
<el-sub-menu index="2-4">
|
||||
<template #title>item four</template>
|
||||
<el-menu-item index="2-4-1">item one</el-menu-item>
|
||||
<el-menu-item index="2-4-2">item two</el-menu-item>
|
||||
<el-menu-item index="2-4-3">item three</el-menu-item>
|
||||
</el-sub-menu>
|
||||
</el-sub-menu>
|
||||
<el-menu-item index="3" disabled>Info</el-menu-item>
|
||||
<el-menu-item index="4">Orders</el-menu-item>
|
||||
</el-menu>
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
const activeIndex = ref('1')
|
||||
const handleSelect = (key, keyPath) => {
|
||||
console.log(key, keyPath)
|
||||
}
|
||||
</script>
|
||||
18
Yi.BBS.Vue3/src/layout/Index.vue
Normal file
18
Yi.BBS.Vue3/src/layout/Index.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<div class="common-layout">
|
||||
<el-container>
|
||||
<el-header>
|
||||
|
||||
<AppHeader />
|
||||
|
||||
</el-header>
|
||||
<el-main>
|
||||
<AppBody />
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import AppHeader from "./AppHeader.vue"
|
||||
import AppBody from "./AppBody.vue"
|
||||
</script>
|
||||
Reference in New Issue
Block a user