Xiao_123 8 months ago
parent
commit
c1c4fe0f56
2 changed files with 8 additions and 4 deletions
  1. 6 2
      components/FilterList/index.vue
  2. 2 2
      pages/index/position.vue

+ 6 - 2
components/FilterList/index.vue

@@ -1,14 +1,18 @@
 <template>
-  <view class="labelColor itemBox">
+  <view class="labelColor itemBox" style="height: 45px;">
     <view class="item" v-for="item in filterList" :key="item[props.idValue]">
       <uni-data-picker 
+        v-slot:default="{ error }"
         :localdata="item.array" 
         :clear-icon="true"
         :popup-title="'请选择' + item[labelValue]" 
         :map="item.map || { text: 'label', value: 'value' }"
          @change="e => handleClick(e, item)"
       >
-        <view>
+        <view v-if="error" class="error">
+          <text>{{error}}</text>
+        </view>
+        <view v-else>
           {{ item[labelValue] }}
           <uni-icons type="icon-arrow-sortdown-smal" custom-prefix="iconfont" color="#999"/>
         </view>

+ 2 - 2
pages/index/position.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="box defaultBgc">
-    <scroll-view class="scrollBox" scroll-y="true" :refresher-enabled="false" @scrolltolower="loadingMore" style="position:relative;">
+    <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="position:relative;">
       <view class="white-bgc">
         <uni-search-bar
           v-model="query.content"
@@ -14,7 +14,7 @@
       </view>
       <view class="white-bgc px-10 pb-10 mb-10">
         <SwiperAd :list="swiperAdList"></SwiperAd>
-        <FilterList :list="filterList" idValue="label" class="ss-m-t-30" @change="handleSearch"></FilterList>
+        <FilterList :list="filterList" idValue="label" @change="handleSearch"></FilterList>
       </view>
       <PositionList class="pb-10" :list="positionListData" :noMore="noMore"></PositionList>
     </scroll-view>