web/src/views/LayoutInventory.vue

85 lines
1.6 KiB
Vue

<template>
<div class="layout-container">
<Header class="header"/>
<header>
<div class="center-wrapper">
<div class="childMenu">
<router-link :to="item.path" class="child-item" v-for="(item,index) in childMenuList" :key="index">
{{ item.name }}
</router-link>
</div>
</div>
</header>
<div class="space"></div>
<main class="layout-main">
<router-view/>
</main>
<div class="space"></div>
<Footer class="footer"/>
</div>
</template>
<style scoped lang="scss">
.childMenu {
width: 100%;
height: 60px;
background: #fff;
display: flex;
align-items: center;
.child-item {
display: inline-block;
color: #151515;
outline: none;
text-decoration: none;
font-size: 18px;
margin-left: 10px;
margin-right: 10px;
height: 35px;
position: relative;
}
.router-link-active:after {
content: '';
display: block;
width: 100%;
height: 2px;
background-color: #151515; // 下划线颜色
position: absolute;
bottom: -5px; // 调整下划线与文字的距离
left: 0;
}
}
</style>
<script setup lang="ts">
import "@/assets/scss/layout.scss"
import Header from "@/components/common/Header.vue";
import Footer from "@/components/common/Footer.vue";
import {ref} from "vue";
const childMenuList = ref([
{
name: '商品',
path: '/inventory/goods',
},
{
name: '采购',
path: '/inventory/inventory',
},
{
name: '领用',
path: '/inventory/apply',
},
{
name: '供应商',
path: '/inventory/supplier',
},
{
name: '盘点',
path: '/inventory/check',
}
])
</script>