mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-06-12 21:29:31 +08:00
fix: 修复个人图库分类少于2条不显示问题,修复图片预览问题
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="app-page">
|
<view class="app-page">
|
||||||
<!-- 顶部切换 -->
|
<!-- 顶部切换 -->
|
||||||
<view class="e-fixed" v-if="category.list.length > 2">
|
<view class="e-fixed" v-if="category.list.length > 0">
|
||||||
<tm-tabs color="light-blue" v-model="category.activeIndex" range-key="displayName" :list="category.list"
|
<tm-tabs color="light-blue" v-model="category.activeIndex" range-key="displayName" :list="category.list"
|
||||||
align="left" @change="fnOnCategoryChange"></tm-tabs>
|
align="left" @change="fnOnCategoryChange"></tm-tabs>
|
||||||
</view>
|
</view>
|
||||||
<!-- 占位区域 -->
|
<!-- 占位区域 -->
|
||||||
<view style="width: 100vw;height: 90rpx;"></view>
|
<view v-if="category.list.length > 0" style="width: 100vw;height: 90rpx;"></view>
|
||||||
<!-- 加载区域 -->
|
<!-- 加载区域 -->
|
||||||
<view v-if="loading != 'success'" class="loading-wrap">
|
<view v-if="loading != 'success'" class="loading-wrap">
|
||||||
<tm-skeleton model="card"></tm-skeleton>
|
<tm-skeleton model="card"></tm-skeleton>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
animation-name="fadeUp" :wait="calcAniWait(index)">
|
animation-name="fadeUp" :wait="calcAniWait(index)">
|
||||||
<view style="border-radius: 12rpx;overflow: hidden;width: 100%;height: 250rpx;">
|
<view style="border-radius: 12rpx;overflow: hidden;width: 100%;height: 250rpx;">
|
||||||
<image style="width: 100%;height: 100%;" mode="aspectFill" :src="item.spec.cover"
|
<image style="width: 100%;height: 100%;" mode="aspectFill" :src="item.spec.cover"
|
||||||
@click="fnPreview(item)" />
|
@click="fnPreview(index)" />
|
||||||
</view>
|
</view>
|
||||||
</tm-translate>
|
</tm-translate>
|
||||||
</block>
|
</block>
|
||||||
@@ -194,11 +194,10 @@
|
|||||||
console.log('点击数据', data);
|
console.log('点击数据', data);
|
||||||
},
|
},
|
||||||
// 预览
|
// 预览
|
||||||
fnPreview(item) {
|
fnPreview(index) {
|
||||||
const index = this.cache.dataList.findIndex(x => x.spec.cover == x.spec.cover);
|
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
current: index,
|
current: index,
|
||||||
urls: this.cache.dataList.map(x => x.spec.cover),
|
urls: this.dataList.map(x => x.spec.cover),
|
||||||
indicator: 'number',
|
indicator: 'number',
|
||||||
loop: true
|
loop: true
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user