Procházet zdrojové kódy

Fix 下拉菜单样式修复

Yue před 2 roky
rodič
revize
dd809b41e3

+ 4 - 1
UI/XYH.APP/src/components/searchBar.vue

@@ -156,7 +156,10 @@ function search() {
           <view class="text-gray-4">|</view>
           <view
             class="px-5"
-            :class="{ 'text-vb font-bold': activeTabIndex == i + (searchDropdownList?.length || 0) }"
+            :class="{
+              'text-vb font-bold': activeTabIndex == i + (searchDropdownList?.length || 0),
+              'text-gray-8': activeTabIndex != i + (searchDropdownList?.length || 0),
+            }"
             @click="bindSearchTabClick(i + (searchDropdownList?.length || 0), v.value)"
           >
             {{ v.text }}

+ 2 - 2
UI/XYH.APP/src/components/vber/dropdown/vb-dropdown.vue

@@ -111,9 +111,9 @@ defineExpose({ close })
         @click="bindItemClick(item)"
         :key="index"
       >
-        <view slot="title" class="van-dropdown-item__title item-title-class" :style="itemStyle(item)">
+        <text slot="title" class="vb-dropdown__option__title" :style="itemStyle(item)">
           {{ item[props.map.text] }}
-        </view>
+        </text>
       </view>
     </view>
   </view>

+ 5 - 4
UI/XYH.APP/src/static/scss/vb-component/_dropdown.scss

@@ -54,8 +54,10 @@ view {
     right: 0;
     z-index: 1000;
     background-color: var(--dropdown-menu-background-color);
-    height: 60vh;
+    max-height: 60vh;
     overflow-y: auto;
+    padding-top: 3px;
+    padding-bottom: 20px;
   }
   &__option {
     text-align: left;
@@ -64,9 +66,8 @@ view {
     padding-left: 25px;
     cursor: pointer;
     border-bottom: 1px solid #ebeef5;
-    &__title {
-      color: var(--vb-gray-6);
-    }
+    color: var(--vb-gray-7);
+
     &.active {
       color: var(--dropdown-menu-option-active-color);
       font-weight: bold;