Zlpt_Portal/src/views/AppMain.vue

48 lines
1.0 KiB
Vue
Raw Normal View History

2023-12-04 09:12:38 +08:00
<script setup lang="ts">
2024-11-23 16:31:54 +08:00
import FooterInfo from '../components/FooterInfo/index.vue'
import HeaderCom from '../layout/header.vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
const locale = zhCn
2023-12-07 17:49:10 +08:00
2024-11-23 16:31:54 +08:00
const route = useRoute()
// 判断是否是个人中心页面 如果是则隐藏页脚
const isMyInfoPage = () => {
if (route.path.indexOf('myuser') === -1) {
return true
} else {
return false
2023-12-04 09:12:38 +08:00
}
2024-11-23 16:31:54 +08:00
}
2023-12-04 09:12:38 +08:00
2024-11-23 16:31:54 +08:00
onMounted(() => {})
2023-12-04 09:12:38 +08:00
</script>
<template>
2024-12-20 17:36:14 +08:00
<div class="app-container">
<HeaderCom />
<div class="container">
<el-config-provider :locale="locale">
<RouterView />
</el-config-provider>
</div>
<FooterInfo v-if="isMyInfoPage()" />
2023-12-04 09:12:38 +08:00
</div>
2024-12-20 17:36:14 +08:00
2023-12-05 17:25:00 +08:00
<!-- <FooterInfo /> -->
2023-12-04 09:12:38 +08:00
</template>
<style scoped lang="scss">
2024-12-20 17:36:14 +08:00
.app-container {
display: flex;
flex-direction: column;
}
2024-11-23 16:31:54 +08:00
.container {
2024-12-20 17:36:14 +08:00
width: 100%;
2024-11-23 16:31:54 +08:00
margin: 0 auto;
background: #ffffff;
border-radius: 30px;
padding: 20px 30px;
box-sizing: border-box;
}
2023-12-04 09:12:38 +08:00
</style>