|
@@ -2,7 +2,7 @@ import OEmpty from '@/components/o-empty'
|
|
|
import OHeader from '@/components/o-header'
|
|
|
import request from '@/helpers/request'
|
|
|
import { state } from '@/state'
|
|
|
-import { Grid, GridItem, Image, List, showImagePreview } from 'vant'
|
|
|
+import { Grid, GridItem, Image, List, Loading, showImagePreview } from 'vant'
|
|
|
import { defineComponent, onMounted, reactive } from 'vue'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import styles from './index.module.less'
|
|
@@ -78,21 +78,25 @@ export default defineComponent({
|
|
|
>
|
|
|
<div class={styles.photoWrap}>
|
|
|
{data.list.map((item: any, index: number) => (
|
|
|
- <div class={styles.photoItem} onClick={() => {
|
|
|
- router.push({
|
|
|
- path: '/photo-list',
|
|
|
- query: {
|
|
|
- id: item.id
|
|
|
- }
|
|
|
- })
|
|
|
- }}>
|
|
|
- {item.coverUrl ? (
|
|
|
- <Image class={styles.gridImg} src={item.coverUrl} fit="cover" />
|
|
|
- ) : (
|
|
|
- <div class={styles.gridImg}>
|
|
|
- <Image src={iconImage} fit="cover" />
|
|
|
- </div>
|
|
|
- )}
|
|
|
+ <div
|
|
|
+ class={styles.photoItem}
|
|
|
+ onClick={() => {
|
|
|
+ router.push({
|
|
|
+ path: '/photo-list',
|
|
|
+ query: {
|
|
|
+ id: item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Image
|
|
|
+ class={styles.gridImg}
|
|
|
+ src={item.coverUrl || 'none'}
|
|
|
+ fit="cover"
|
|
|
+ errorIcon={iconImage}
|
|
|
+ >
|
|
|
+ {{ loading: () => <Loading type="spinner" /> }}
|
|
|
+ </Image>
|
|
|
|
|
|
<div class={styles.gridName}>{item.name}</div>
|
|
|
<div class={styles.gridDes}>{item.photoCount}张</div>
|