<template>
	<a-config-provider :locale="locale">
		<a-layout>
			<a-layout-header class="header">
				<div class="logo" />
				<a-menu
					v-model:selectedKeys="selectedKeys1"
					theme="dark"
					mode="horizontal"
					:style="{ lineHeight: '64px' }"
				>
					<a-menu-item key="1">
						<router-link to="/$app">我公司</router-link>
					</a-menu-item>
					<a-menu-item key="2">
						<router-link to="/supplier">供应商操作界面</router-link>
					</a-menu-item>
				</a-menu>
			</a-layout-header>
			<router-view></router-view>
		</a-layout>
	</a-config-provider>
</template>

<script setup>
import { computed, ref } from "vue";
import { useRoute } from "vue-router";
import zhCN from "ant-design-vue/es/locale/zh_CN";

const locale = zhCN;
const selectedKeys2 = ref(["1"]);
const openKeys = ref(["sub1"]);
const route = useRoute();
const routeName = computed(() => route.meta?.name);
const parentName = computed(() => route.meta?.parent);
</script>

<style>
#components-layout-demo-top-side-2 .logo {
	float: left;
	width: 120px;
	height: 31px;
	margin: 16px 24px 16px 0;
	background: rgba(255, 255, 255, 0.3);
}

.ant-row-rtl #components-layout-demo-top-side-2 .logo {
	float: right;
	margin: 16px 0 16px 24px;
}

.site-layout-background {
	background: #fff;
}
</style>
