فهرست منبع

工作台最近使用功能数量限制

fanghuisheng 2 سال پیش
والد
کامیت
298f20a213
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/pages/index.vue

+ 2 - 2
src/pages/index.vue

@@ -4,7 +4,7 @@
   <!-- <pagesHarder></pagesHarder> -->
 
   <scroll-view scroll-x>
-    <view style="margin-bottom:50px">
+    <view style="margin-bottom: 50px">
       <!-- 下拉选择 -->
       <!-- <view class="searchSelect shadow" v-if="flag">
         <view class="cu-bar search bg-white">
@@ -121,7 +121,7 @@
       <view class="section2 section bg-white" style="margin-bottom: 10px" v-if="arrayList.recentlyUsed.length > 0">
         <view style="color: #000000; font-size: 14px; padding: 10px 10px 5px 10px">最近使用</view>
         <view class="cu-list grid col-5 no-border">
-          <view class="cu-item justify-center align-center" @tap="navItemClick(item)" v-for="(item, index) in arrayList.recentlyUsed" :key="index">
+          <view class="cu-item justify-center align-center" @tap="navItemClick(item)" v-for="(item, index) in arrayList.recentlyUsed.slice(0, 5)" :key="index">
             <image :src="item.meta.icon" style="width: 40px; height: 40px"></image>
             <!-- <view class="cu-tag badge" v-if="item.badge != 0">
               <block v-if="item.badge != 0">{{ item.badge > 99 ? "99+" : item.badge }}</block>