Browse Source

去除两个tab

lanxin 1 week ago
parent
commit
74fc1120bc
4 changed files with 1965 additions and 38 deletions
  1. 1 0
      package.json
  2. 10 0
      pnpm-lock.yaml
  3. 38 38
      src/views/info.vue
  4. 1916 0
      yarn.lock

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
     "axios": "^1.6.2",
     "naive-ui": "^2.35.0",
     "pinia": "^2.1.7",
+    "pnpm": "^10.15.0",
     "sharp": "^0.32.6",
     "svgo": "^3.0.4",
     "vite-plugin-image-optimizer": "^1.1.7",

+ 10 - 0
pnpm-lock.yaml

@@ -29,6 +29,9 @@ importers:
       pinia:
         specifier: ^2.1.7
         version: 2.3.1(vue@3.5.13)
+      pnpm:
+        specifier: ^10.15.0
+        version: 10.15.0
       sharp:
         specifier: ^0.32.6
         version: 0.32.6
@@ -1084,6 +1087,11 @@ packages:
   pkg-types@2.1.0:
     resolution: {integrity: sha512-wmJwA+8ihJixSoHKxZJRBQG1oY8Yr9pGLzRmSsNms0iNWyHHAlZCa7mmKiFR10YPZuz/2k169JiS/inOjBCZ2A==}
 
+  pnpm@10.15.0:
+    resolution: {integrity: sha512-SG68JZ0+mZpOhpHOA7XKxKccvso5Nyqbdiy1AM/fCHPiyxar49lRse4s8BJQPwJ7mLZYTk3yJSTgx0UNnseqew==}
+    engines: {node: '>=18.12'}
+    hasBin: true
+
   postcss@8.5.3:
     resolution: {integrity: sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==}
     engines: {node: ^10 || ^12 || >=14}
@@ -2208,6 +2216,8 @@ snapshots:
       exsolve: 1.0.5
       pathe: 2.0.3
 
+  pnpm@10.15.0: {}
+
   postcss@8.5.3:
     dependencies:
       nanoid: 3.3.11

+ 38 - 38
src/views/info.vue

@@ -35,18 +35,18 @@
             </n-grid>
             <empty :show="activates.length === 0" :height="500" />
           </n-tab-pane> -->
-          <n-tab-pane name="news" tab="新闻">
+          <!-- <n-tab-pane name="news" tab="新闻">
             <div>123</div>
-            <!-- <n-grid :x-gap="XGap" :y-gap="YGap" :cols="3" class="tab-grid">
+            <n-grid :x-gap="XGap" :y-gap="YGap" :cols="3" class="tab-grid">
               <template v-for="item in news">
                 <n-gi>
                   <info-box :id="item.id" :title="item.name" :cover="domain + item.thumb" :time="item.publishDate" />
                 </n-gi>
               </template>
-            </n-grid> -->
+            </n-grid>
             <empty :show="news.length === 0" :height="500" />
-          </n-tab-pane>
-          <n-tab-pane name="notices" tab="通知">
+          </n-tab-pane> -->
+          <!-- <n-tab-pane name="notices" tab="通知">
             <n-grid :y-gap="YGap" :cols="1" class="tab-grid">
               <template v-for="item in notices">
                 <n-gi>
@@ -55,7 +55,7 @@
               </template>
             </n-grid>
             <empty :show="notices.length === 0" :height="500" />
-          </n-tab-pane>
+          </n-tab-pane> -->
         </n-tabs>
       </div>
       <side-menu />
@@ -64,56 +64,56 @@
 </template>
 
 <script setup>
-import { onMounted, watch, computed } from "vue"
-import { vInfiniteScroll } from "@vueuse/components"
-import infoBox from "../components/infoBox"
-import subHeader from "../components/subHeader"
-import sideMenu from "../components/sideMenu"
-import noticeBox from "../components/noticeBox"
-import empty from "../components/empty.vue"
-import { useInfoStore } from "../store/info"
-import { useLoadingBar } from "naive-ui"
+import { onMounted, watch, computed } from "vue";
+import { vInfiniteScroll } from "@vueuse/components";
+import infoBox from "../components/infoBox";
+import subHeader from "../components/subHeader";
+import sideMenu from "../components/sideMenu";
+import noticeBox from "../components/noticeBox";
+import empty from "../components/empty.vue";
+import { useInfoStore } from "../store/info";
+import { useLoadingBar } from "naive-ui";
 
-const infoStore = useInfoStore()
-const loadingBar = useLoadingBar()
-const domain = ref(import.meta.env.VITE_DOMAIN_URL)
-const currentTab = ref("exhibitions")
-const news = computed(() => infoStore.news)
-const notices = computed(() => infoStore.notices)
-const activates = computed(() => infoStore.activates)
-const exhibitions = computed(() => infoStore.exhibitions)
+const infoStore = useInfoStore();
+const loadingBar = useLoadingBar();
+const domain = ref(import.meta.env.VITE_DOMAIN_URL);
+const currentTab = ref("exhibitions");
+const news = computed(() => infoStore.news);
+const notices = computed(() => infoStore.notices);
+const activates = computed(() => infoStore.activates);
+const exhibitions = computed(() => infoStore.exhibitions);
 const handleTabFetch = async (type) => {
-  loadingBar.start()
-  await infoStore.switchTab(type)
-  loadingBar.finish()
-}
+  loadingBar.start();
+  await infoStore.switchTab(type);
+  loadingBar.finish();
+};
 
 watch(
   currentTab,
   (val) => {
     if (val === "news") {
-      window.open("http://www.qsqyhsjng.com/szjq/jqxw/")
-      currentTab.value = "exhibitions"
+      window.open("http://www.qsqyhsjng.com/szjq/jqxw/");
+      currentTab.value = "exhibitions";
     }
     if (val === "notices") {
-      window.open("http://www.qsqyhsjng.com/jqgk/tzgg/")
-      currentTab.value = "exhibitions"
+      window.open("http://www.qsqyhsjng.com/jqgk/tzgg/");
+      currentTab.value = "exhibitions";
     }
-    console.log("currentTab", val)
-    handleTabFetch(val)
+    console.log("currentTab", val);
+    handleTabFetch(val);
   },
   {
     immediate: true,
   }
-)
-const XGap = ref(50)
-const YGap = ref(50)
+);
+const XGap = ref(50);
+const YGap = ref(50);
 
 const onLoadMore = () => {
   if (infoStore.isLoad) {
-    infoStore.loadMore(currentTab.value)
+    infoStore.loadMore(currentTab.value);
   }
-}
+};
 </script>
 
 <style lang="scss" scoped></style>

File diff suppressed because it is too large
+ 1916 - 0
yarn.lock