nankai-cms-website-gov/layouts/default.vue
2025-03-13 09:52:18 +08:00

53 lines
1.3 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="default-layout">
<Head>
<Title>{{ siteConfig.title }}</Title>
<Meta type="keywords" :content="siteConfig.keywords"/>
<Meta type="description" :content="siteConfig.description"/>
</Head>
<header>
<WebHeader :categories="categories"/>
<!-- 栏目树 d-none d-sm-block在xs(默认宽度576px)隐藏 -->
<div class="d-none d-sm-block">
<Categories :categories="categories"/>
</div>
</header>
<main>
<!-- 修改el语言为中文 -->
<el-config-provider :locale="zhCn">
<slot></slot>
</el-config-provider>
</main>
<footer>
<WebFooter/>
</footer>
</div>
</template>
<script>
import WebHeader from '@/components/layout/WebHeader'
import WebFooter from '@/components/layout/WebFooter'
import Categories from '@/components/layout/Categories'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
export default {
components: { Categories, WebFooter, WebHeader},
props: {
// 栏目树
categories: {
required: true
}
},
data () {
return {
zhCn,
siteConfig: {
title: import.meta.env.VITE_SITE_TITLE,
keywords: import.meta.env.VITE_SEO_KEYWORDS,
description: import.meta.env.VITE_SEO_DESCRIPTION
}
}
}
}
</script>