浏览代码

修改props类型

songzhen 5 月之前
父节点
当前提交
539162650b
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      src/pages/home/comps/HotDestination.vue
  2. 2 2
      src/pages/home/comps/HotProjects.vue

+ 1 - 1
src/pages/home/comps/HotDestination.vue

@@ -18,7 +18,7 @@
 <script setup>
 defineProps({
   data: {
-    type: String,
+    type: Array,
     default: () => [],
   },
 });

+ 2 - 2
src/pages/home/comps/HotProjects.vue

@@ -6,7 +6,7 @@
     </div>
     <div class="content">
       <div class="wrap" v-for="item in data" :key="item.id">
-        <image :src="item.homeHotPicturesAfterConvert[0]" mode="scaleToFill" />
+        <image :src="item.homeHotPicturesAfterConvert[0]" mode="aspectFill" />
         <div class="text-wrap">
           {{ item.projectTitle }}
         </div>
@@ -18,7 +18,7 @@
 <script setup>
 defineProps({
   data: {
-    type: String,
+    type: Array,
     default: () => [],
   },
 });