skyblued 2 tahun lalu
induk
melakukan
826146c6e7

+ 8 - 4
src/views/accompany/category.tsx

@@ -1,6 +1,6 @@
 import request from '@/helpers/request'
 import { state } from '@/state'
-import { Button, Icon } from 'vant'
+import { Button, Icon, Image, Loading } from 'vant'
 import { defineComponent, reactive, onMounted } from 'vue'
 import { useRouter } from 'vue-router'
 import { getImage } from './images'
@@ -24,7 +24,6 @@ export default defineComponent({
           return (
             <div
               class={styles.container}
-              style={{ backgroundImage: `url(${item.icon})` }}
               onClick={() => {
                 router.replace({
                   path: '/accompany/musicList',
@@ -34,14 +33,19 @@ export default defineComponent({
                 })
               }}
             >
-              <div class={styles.title}>{item.title}</div>
+              <Image src={item.icon} width="100%" height="100%">
+                {{
+                  loading: () => <Loading type="spinner" size="20" />
+                }}
+              </Image>
+              {/* <div class={styles.title}>{item.title}</div>
               <div class={styles.sub}>{item.subtitle}</div>
               <div
                 class={styles.btn}
                 style={{ backgroundImage: `url(${item.btnIcon})`, color: item.color }}
               >
                 GO <Icon name="arrow" />
-              </div>
+              </div> */}
             </div>
           )
         })}

+ 1 - 2
src/views/accompany/index.module.less

@@ -4,11 +4,10 @@
     box-sizing: border-box;
   }
   .container {
-    margin: 16px 12px;
+    margin: 12px;
     height: 140px;
     background-repeat: no-repeat;
     background-size: 100% 100%;
-    padding: 8px 20px;
     display: flex;
     flex-direction: column;
     justify-content: space-evenly;