Explorar el Código

fix: 修改搜索框回车搜索异常问题;修改详情内图片容器的高度

yongCode hace 4 meses
padre
commit
44944adcab
Se han modificado 2 ficheros con 8 adiciones y 4 borrados
  1. 2 2
      src/views/DetailView.vue
  2. 6 2
      src/views/HomeView.vue

+ 2 - 2
src/views/DetailView.vue

@@ -36,14 +36,14 @@
             <van-grid
               square
               :column-num="4"
-              class="h-full w-full object-cover md:h-[105px] mt-4"
+              class="w-full object-cover mt-4"
               :gutter="10"
             >
               <van-grid-item
                 v-for="syt in sytList"
                 :key="syt.id"
                 @click="changeImg(syt)"
-                :class="[syt.id === detailImg ? 'active' : '']"
+                :class="[syt.id === detailImg ? 'active' : '', 'cursor-pointer']"
               >
                 <van-image class="max-w-[105px] max-h-[105px]" :src="devPath + syt.filePath" />
               </van-grid-item>

+ 6 - 2
src/views/HomeView.vue

@@ -19,7 +19,11 @@
             input-align="left"
             left-icon=""
             right-icon="search"
-            @search="handleSearch"
+            @search="
+              () => {
+                handleSearch()
+              }
+            "
             @clear="handleClear"
             @click-right-icon="
               () => {
@@ -108,7 +112,7 @@
       finished-text="没有更多了"
       @load="onLoad"
     >
-      <div class="w-full px-4 ">
+      <div class="w-full px-4">
         <div class="tool-card-content w-full flex flex-wrap mx-auto md:max-w-[1440px]">
           <div
             class="tool-card"