feat(FamilyAlbum): 替换上传图标并增加显示照片数量
将上传按钮的相机emoji替换为Photograph组件图标 将相册显示照片数量从3张增加到5张
Showing
1 changed file
with
6 additions
and
4 deletions
| ... | @@ -59,8 +59,10 @@ | ... | @@ -59,8 +59,10 @@ |
| 59 | class="rounded-lg aspect-square relative cursor-pointer shadow-md bg-gray-100 flex flex-col items-center justify-center border-2 border-dashed border-gray-100 hover:border-blue-400 transition-colors" | 59 | class="rounded-lg aspect-square relative cursor-pointer shadow-md bg-gray-100 flex flex-col items-center justify-center border-2 border-dashed border-gray-100 hover:border-blue-400 transition-colors" |
| 60 | @click="navigateToUpload" | 60 | @click="navigateToUpload" |
| 61 | > | 61 | > |
| 62 | - <view class="text-gray-400 text-3xl mb-2">📷</view> | 62 | + <view class="text-gray-400 mb-4"> |
| 63 | - <view class="text-gray-500 text-xs text-center px-2">上传第一张<br/>照片吧~</view> | 63 | + <Photograph size="28" /> |
| 64 | + </view> | ||
| 65 | + <view class="text-gray-500 text-xs text-center px-2">上传第一张照片吧~</view> | ||
| 64 | </view> | 66 | </view> |
| 65 | </view> | 67 | </view> |
| 66 | </view> | 68 | </view> |
| ... | @@ -116,7 +118,7 @@ | ... | @@ -116,7 +118,7 @@ |
| 116 | <script setup> | 118 | <script setup> |
| 117 | import { ref, onMounted, computed } from 'vue'; | 119 | import { ref, onMounted, computed } from 'vue'; |
| 118 | import Taro, { useDidShow } from '@tarojs/taro'; | 120 | import Taro, { useDidShow } from '@tarojs/taro'; |
| 119 | -import { Close } from '@nutui/icons-vue-taro'; | 121 | +import { Close, Photograph } from '@nutui/icons-vue-taro'; |
| 120 | import { useMediaPreview } from '@/composables/useMediaPreview'; | 122 | import { useMediaPreview } from '@/composables/useMediaPreview'; |
| 121 | import { getPhotoListAPI } from '@/api/photo'; | 123 | import { getPhotoListAPI } from '@/api/photo'; |
| 122 | 124 | ||
| ... | @@ -143,7 +145,7 @@ const loading = ref(false); | ... | @@ -143,7 +145,7 @@ const loading = ref(false); |
| 143 | 145 | ||
| 144 | // 计算属性:显示最多3张图片 | 146 | // 计算属性:显示最多3张图片 |
| 145 | const displayedAlbumData = computed(() => { | 147 | const displayedAlbumData = computed(() => { |
| 146 | - return albumData.value.slice(0, 3); | 148 | + return albumData.value.slice(0, 5); |
| 147 | }); | 149 | }); |
| 148 | 150 | ||
| 149 | /** | 151 | /** | ... | ... |
-
Please register or login to post a comment