Explorar o código

feat:样式优化

qiao hai 2 meses
pai
achega
4552a3d45f

+ 6 - 1
src/pages/house/components/filters.vue

@@ -505,4 +505,9 @@ function doEmit() {
     }
     emit('change', str)
 }
-</script>
+</script>
+<style scoped lang="scss">
+::v-deep .van-picker__confirm {
+    color: #fd9a00;
+}
+</style>

+ 7 - 6
src/pages/house/newHouse/[id].vue

@@ -109,16 +109,16 @@
                 <van-tab title="周边配套">
                     <div class="min-h-[200px] pt-[10px]">
                         <div>{{ detailData?.tourHouseSaleInfoVo?.surroundingSupport }}</div>
-                        <div v-for="(item,index) in detailData?.surroundingAtlasList" :key="index" class="w-full aspect-[1.3/1] mt-10">
-                            <img  class="w-full h-full object-cover" :src="item" alt="" />
+                        <div v-for="(item,index) in detailData?.surroundingAtlasList" :key="index" class="w-full mt-10">
+                            <img  class="w-full" :src="item" alt="" />
                         </div>
                     </div>
                 </van-tab>
                 <van-tab title="小区介绍">
                     <div class="min-h-[200px] pt-[10px]">
                         <div>{{ detailData?.tourHouseSaleInfoVo?.plotIntroduction }}</div>
-                        <div v-for="(item,index) in detailData?.communityIntroductionAtlas" :key="index" class="w-full aspect-[1.3/1] mt-10">
-                            <img  class="w-full h-full object-cover" :src="item" alt="" />
+                        <div v-for="(item,index) in detailData?.communityIntroductionAtlas" :key="index" class="w-full mt-10">
+                            <img  class="w-full" :src="item" alt="" />
                         </div>
                     </div>
                 </van-tab>
@@ -169,7 +169,7 @@ const onSwiper = (swiper) => {
 const onSlideChange = () => {
     if (swiperInstance) {
         // realIndex 是当前实际的索引(考虑了 loop 模式)
-        currentIndex.value = swiperInstance.realIndex + 1
+        currentIndex.value = isNaN(swiperInstance.realIndex + 1)?1 : swiperInstance.realIndex + 1
     }
 }
 const active = ref(0);
@@ -181,7 +181,7 @@ onMounted(() => {
 })
 </script>
 
-<style scoped>
+<style scoped lang="scss">
 .swiper {
     @apply w-full h-full;
 }
@@ -198,4 +198,5 @@ onMounted(() => {
 .absolute {
     transition: all 0.3s ease;
 }
+
 </style>

+ 5 - 5
src/pages/house/oldHouse/[id].vue

@@ -123,16 +123,16 @@
                         <div>
                             {{ detailData?.tourHouseSaleInfoVo?.surroundingSupport }}
                         </div>
-                        <div v-for="(item,index) in detailData?.surroundingAtlasList" :key="index" class="w-full aspect-[1.3/1] mt-10">
-                            <img  class="w-full h-full object-cover" :src="item" alt="" />
+                        <div v-for="(item,index) in detailData?.surroundingAtlas" :key="index" class="w-full mt-10">
+                            <img  class="w-full" :src="item" alt="" />
                         </div>
                     </div>
                 </van-tab>
                 <van-tab title="小区介绍">
                     <div class="min-h-[200px] pt-[10px]">
                         <div>{{ detailData?.tourHouseSaleInfoVo?.plotIntroduction }}</div>
-                        <div v-for="(item,index) in detailData?.communityIntroductionAtlas" :key="index" class="w-full aspect-[1.3/1] mt-10">
-                            <img  class="w-full h-full object-cover" :src="item" alt="" />
+                        <div v-for="(item,index) in detailData?.communityIntroductionAtlas" :key="index" class="w-full mt-10">
+                            <img  class="w-full" :src="item" alt="" />
                         </div>
                     </div>
                 </van-tab>
@@ -182,7 +182,7 @@ const onSwiper = (swiper) => {
 const onSlideChange = () => {
     if (swiperInstance) {
         // realIndex 是当前实际的索引(考虑了 loop 模式)
-        currentIndex.value = swiperInstance.realIndex + 1
+        currentIndex.value = isNaN(swiperInstance.realIndex + 1)?1 : swiperInstance.realIndex + 1
     }
 }
 const active = ref(0);

+ 6 - 5
src/pages/house/rentHouse/[id].vue

@@ -152,8 +152,8 @@
                         <div>
                             {{ dataDetail?.tourHouseEquipment?.surroundingSupport }}
                         </div>
-                        <div v-for="(item,index) in dataDetail?.tourHouseEquipment?.surroundingSupportConvertImage" :key="index" class="w-full aspect-[1.3/1] mt-10">
-                            <img  class="w-full h-full object-cover" :src="item" alt="" />
+                        <div v-for="(item,index) in dataDetail?.tourHouseEquipment?.surroundingSupportConvertImage" :key="index" class="w-full mt-10">
+                            <img  class="w-full" :src="item" alt="" />
                         </div>
                     </div>
                 </van-tab>
@@ -162,8 +162,8 @@
                         <div>
                             {{ dataDetail?.tourHouseEquipment?.plotIntroduction }}
                         </div>
-                        <div v-for="(item,index) in dataDetail?.tourHouseEquipment?.plotIntroductionConvertImage" :key="index" class="w-full aspect-[1.3/1] mt-10">
-                            <img  class="w-full h-full object-cover" :src="item" alt="" />
+                        <div v-for="(item,index) in dataDetail?.tourHouseEquipment?.plotIntroductionConvertImage" :key="index" class="w-full mt-10">
+                            <img  class="w-full" :src="item" alt="" />
                         </div>
                     </div>
                 </van-tab>
@@ -219,7 +219,8 @@ const onSwiper = (swiper) => {
 const onSlideChange = () => {
     if (swiperInstance) {
         // realIndex 是当前实际的索引(考虑了 loop 模式)
-        currentIndex.value = swiperInstance.realIndex + 1 || 1
+        currentIndex.value = isNaN(swiperInstance.realIndex + 1)?1 : swiperInstance.realIndex + 1
+        
     }
 }
 const active = ref(0);