Browse Source

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

yongCode 4 months ago
parent
commit
44944adcab
2 changed files with 8 additions and 4 deletions
  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"