Jelajahi Sumber

feat: new antiquity

chenlei 3 bulan lalu
induk
melakukan
686bda63cc

TEMPAT SAMPAH
packages/base/images/3D/53.jpg


+ 9 - 7
packages/base/src/antiquity.js

@@ -1588,13 +1588,15 @@ export const antiquityData = [
   `,
   },
   {
-    id: 112, //暂无相关模型
-    link: "",
-    minImg: "",
-    name: "",
-    size: "",
-    weight: "",
-    zd: "",
+    id: 112,
+    link: "lbc53",
+    minImg: "/images/3D/53.jpg",
+    name: "民国时期刘伯承使用过的石印章",
+    size: "长2.8cm,宽2cm,高1.2cm",
+    zd: "象牙",
+    content: `
+    <p>此文物是刘伯承在川军第五师第二混成旅担任第一路指挥官时使用的私章。</p>
+  `,
   },
   {
     id: 113,

+ 29 - 17
packages/pc/src/views/Antiquity/components/List.vue

@@ -1,8 +1,13 @@
 <template>
   <ul class="ant-list">
-    <li v-for="item in list.slice((page - 1) * SIZE, page * SIZE)" :key="item.id" class="ant-item" @click="
-      $router.push({ name: 'antiquityDetail', params: { id: item.id } })
-      ">
+    <li
+      v-for="item in list.slice((page - 1) * SIZE, page * SIZE)"
+      :key="item.id"
+      class="ant-item"
+      @click="
+        $router.push({ name: 'antiquityDetail', params: { id: item.id } })
+      "
+    >
       <div class="ant-item-wrap">
         <ElImage fit="cover" :src="getEnvImagePath(item.minImg)" />
       </div>
@@ -12,35 +17,41 @@
   </ul>
 
   <div class="ant-pagination">
-    <ElPagination background :total="list.length" v-model:current-page="page" :page-size="SIZE" layout="pager"
-      @change="handlePage" />
+    <ElPagination
+      background
+      :total="list.length"
+      v-model:current-page="page"
+      :page-size="SIZE"
+      layout="pager"
+      @change="handlePage"
+    />
   </div>
 </template>
 
 <script setup>
-import { ref, onMounted } from "vue"
-import { getEnvImagePath } from "@lbc/base"
-import { usePaginationStore } from "@/stores/counter"
+import { ref, onMounted } from "vue";
+import { getEnvImagePath } from "@lbc/base";
+import { usePaginationStore } from "@/stores/counter";
 
 defineProps({
   list: {
     type: Array,
     default: [],
   },
-})
+});
 
-const SIZE = 8
-const paginationStore = usePaginationStore()
-const page = ref(paginationStore.page)
+const SIZE = 8;
+const paginationStore = usePaginationStore();
+const page = ref(paginationStore.page);
 
 const handlePage = (p) => {
-  page.value = p
-  paginationStore.setPage(p)
-}
+  page.value = p;
+  paginationStore.setPage(p);
+};
 
 onMounted(() => {
-  page.value = paginationStore.page
-})
+  page.value = paginationStore.page;
+});
 </script>
 
 <style lang="scss" scoped>
@@ -49,6 +60,7 @@ onMounted(() => {
 .ant-list {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
+  grid-template-rows: repeat(2, 1fr);
   gap: utils.vh-calc(30);
   margin: 0 utils.vh-calc(-10);
   width: calc(100% + utils.vh-calc(20));