Browse Source

管理端乐团事迹

skyblued 2 years ago
parent
commit
4969902de4
2 changed files with 15 additions and 1 deletions
  1. 4 0
      src/school/orchestra-story/index.module.less
  2. 11 1
      src/school/orchestra-story/index.tsx

+ 4 - 0
src/school/orchestra-story/index.module.less

@@ -68,6 +68,10 @@
       height: 200px;
       border-radius: 10px;
       overflow: hidden;
+      background-color: #eaeaea;
+      background-repeat: no-repeat;
+      background-position: center;
+      background-image: url('../orchestra/images/icon-photo-default.png');
     }
   }
 

+ 11 - 1
src/school/orchestra-story/index.tsx

@@ -219,7 +219,17 @@ export default defineComponent({
                       item.attachments.map((child: any) => (
                         <SwipeItem>
                           {item.type === 'IMAGE' && (
-                            <Image src={child.url} class={styles.swipeImg} fit="cover" />
+                            <div
+                              class={styles.swipeImg}
+                              style={
+                                child.url
+                                  ? {
+                                      backgroundImage: `url(${child.url})`,
+                                      backgroundSize: 'cover'
+                                    }
+                                  : ''
+                              }
+                            ></div>
                           )}
                           {item.type === 'VIDEO' && (
                             <OVideo