From 375513370cc01fcd976987d07797249600b0bb3e Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期四, 07 八月 2025 17:15:09 +0800
Subject: [PATCH] 'first'

---
 src/layout/index.vue |   48 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/src/layout/index.vue b/src/layout/index.vue
new file mode 100644
index 0000000..3fe18e2
--- /dev/null
+++ b/src/layout/index.vue
@@ -0,0 +1,48 @@
+<template>
+  <div class="homeLayoutBox">
+    <!-- <PageHeader
+      :hideNav="$route.name == 'register' || $route.name == 'login'"
+      :hideSerch="$route.name == 'register' || $route.name == 'login'"
+      v-if="!$route.meta.noWrapHeadFooter"
+    ></PageHeader> -->
+    <div class="pageContentBox">
+      <keep-alive v-if="keepAliveList.length > 0" :include="keepAliveList">
+        <router-view />
+      </keep-alive>
+      <router-view v-else />
+    </div>
+    <PageFooter v-if="!$route.meta.noWrapHeadFooter"></PageFooter>
+  </div>
+</template>
+
+<script>
+import PageHeader from "./components/header";
+import PageFooter from "./components/footer";
+import { mapState } from "vuex";
+export default {
+  components: {
+    // PageHeader,
+    PageFooter
+  },
+  computed: {
+    ...mapState(["keepAliveList"])
+  },
+  watch: {
+    $route(to, from) {
+      if (to.meta.keepAlive && this.keepAliveList.indexOf(to.name) == -1) {
+        // this.$store.commit("addKeepAlive", to.name);
+      }
+    }
+  }
+};
+</script>
+
+<style lang="less" scoped>
+.homeLayoutBox {
+  width: 100%;
+  height: 100%;
+  .pageContentBox {
+    min-height: calc(100% - 232px);
+  }
+}
+</style>

--
Gitblit v1.9.1