Преглед изворни кода

feat: 优化返回顶部按钮大小

小莫唐尼 пре 8 месеци
родитељ
комит
c17e668afe

+ 19 - 3
pages/tabbar/gallery/gallery.vue

@@ -43,12 +43,18 @@
 						</tm-translate>
 					</block>
 
-					<tm-flotbutton @click="fnToTopPage" color="light-blue" size="m" icon="icon-angle-up"></tm-flotbutton>
 					<view class="load-text">{{ loadMoreText }}</view>
 				</block>
 			</k-touch-listen>
         </view>
-    </view>
+    
+		<view v-if="!calcAuditModeEnabled" class="flot-buttons">
+			<tm-button v-if="loading == 'error'" @click="fnGetCategory" size="m" :fab="true" theme="light-blue"
+			           icon="icon-sync-alt"></tm-button>
+		    <tm-button @click="fnToTopPage" size="m" :fab="true" theme="light-blue"
+		               icon="icon-angle-up"></tm-button>
+		</view>
+	</view>
 </template>
 
 <script>
@@ -238,7 +244,7 @@ export default {
                 .getPhotoListByGroupName(this.queryParams)
                 .then(res => {
                     this.hasNext = res.hasNext;
-                    this.loading = 'success';
+                    this.loading = 'error';
                     if (res.items.length !== 0) {
                         const _list = res.items.map((item, index) => {
                             item.spec.url = this.$utils.checkImageUrl(item.spec.url || item.spec.cover);
@@ -342,4 +348,14 @@ export default {
     width: 100%;
     text-align: center;
 }
+
+.flot-buttons {
+    position: fixed;
+    bottom: 100rpx;
+    right: 32rpx;
+    flex-direction: column;
+    display: flex;
+    gap: 6rpx;
+    z-index: 999;
+}
 </style>

+ 1 - 1
pages/tabbar/home/home.vue

@@ -84,7 +84,7 @@
                     </tm-translate>
                 </view>
                 <view class="load-text mt-12">{{ loadMoreText }}</view>
-                <tm-flotbutton v-if="articleList.length > 10" color="light-blue" @click="fnToTopPage" size="m"
+                <tm-flotbutton v-if="articleList.length > 10" :width="90" color="light-blue" @click="fnToTopPage" size="s"
                                icon="icon-angle-up"></tm-flotbutton>
             </block>
         </block>

+ 1 - 1
pages/tabbar/moments/moments.vue

@@ -76,7 +76,7 @@
             </view>
           </tm-translate>
         </block>
-        <tm-flotbutton @click="fnToTopPage" size="m" color="light-blue" icon="icon-angle-up"></tm-flotbutton>
+        <tm-flotbutton @click="fnToTopPage" :width="90" size="xs" color="light-blue" :icon-size="24" icon="icon-angle-up"></tm-flotbutton>
         <view class="load-text">{{ loadMoreText }}</view>
       </block>
     </view>

+ 2 - 2
pagesA/article-detail/article-detail.vue

@@ -152,9 +152,9 @@
             <!-- 弹幕效果 -->
             <barrage ref="barrage" :maxTop="240" :type="globalAppSettings.barrage.type"></barrage>
             <!-- 返回顶部 -->
-            <tm-flotbutton :offset="[16, 80]" icon="icon-angle-up" color="bg-gradient-light-blue-accent"
+            <tm-flotbutton :width="90" :offset="[16, 80]"  icon="icon-angle-up" color="bg-gradient-light-blue-accent"
                            @click="fnToTopPage()"></tm-flotbutton>
-            <tm-flotbutton :actions="flotButtonActions" :click-actions-hiden="false" actions-pos="left"
+            <tm-flotbutton :width="90" :actions="flotButtonActions" :click-actions-hiden="false" actions-pos="left"
                            :show-text="true" color="bg-gradient-orange-accent" @change="fnOnFlotButtonChange"></tm-flotbutton>
         </block>