Selaa lähdekoodia

style: 修复已存筛选卡片高度问题

cuiyalong 1 vuosi sitten
vanhempi
commit
bcaada5f89

+ 2 - 1
apps/mobile/src/components/search/bidding/filterHistoryDialog.vue

@@ -9,7 +9,7 @@
     @close="onClose(false)"
     :before-close="beforeClose"
     show-cancel-button>
-    <CellCard>
+    <CellCard scroll>
       <template #header-left>
         <div class="card-left-header">
           <div class="card-item">
@@ -84,6 +84,7 @@ export default {
 }
 .card-item {
   display: flex;
+  padding: 0 12px;
   .item-label {
     white-space: nowrap;
   }

+ 21 - 4
apps/mobile/src/ui/cell-card/index.vue

@@ -11,7 +11,13 @@
       </div>
     </div>
     <div class="card-content-container" @click="onClickContent">
-      <div class="card-content" :class="{ 'ellipsis inline': (!expand && overflowEllipsis) }">
+      <div
+        class="card-content"
+        :class="{
+          'ellipsis inline': !expand && overflowEllipsis,
+          'need-scroll': scroll
+        }"
+      >
         <slot name="default"></slot>
       </div>
       <button class="expand-button" v-if="showExpandButton" @click.stop="changeExpandState">
@@ -49,6 +55,11 @@ export default {
       type: Boolean,
       default: true
     },
+    // 是否需要滚动
+    scroll: {
+      type: Boolean,
+      default: false
+    },
     /**
      * 是否展示头部右侧箭头
      */
@@ -99,7 +110,7 @@ export default {
 }
 .card-content-container {
   position: relative;
-  padding: 8px 12px;
+  padding: 8px 0;
   min-height: 40px;
   line-height: 22px;
   font-size: 13px;
@@ -121,7 +132,13 @@ export default {
   border-radius: 4px;
   z-index: 2;
 }
-.card-content.inline > * {
-  display: inline-block;
+.card-content {
+  &.need-scroll {
+    max-height: 320px;
+    overflow-y: auto;
+  }
+  &.inline > * {
+    display: inline-block;
+  }
 }
 </style>

+ 1 - 0
apps/mobile/src/views/search/filter-history/bidding.vue

@@ -771,6 +771,7 @@ export default {
 
 .card-item {
   display: flex;
+  padding: 0 12px;
 
   &.close {
     margin-right: 4px;