This commit is contained in:
shikong 2024-10-17 13:49:29 +08:00
parent b4d20cd3fe
commit fe5faf2cdc
Signed by: Shikong
GPG Key ID: BD85FF18B373C341
2 changed files with 11 additions and 10 deletions

View File

@ -10,11 +10,13 @@ const props = defineProps({
</script> </script>
<template> <template>
<view style="text-align:center;padding:5px"> <view style="text-align:center;padding:5px" class="h-18">
<image :src="props.src" mode="widthFix" style="width: 100%; height: 100%"/> <image :src="props.src" mode="widthFix" class="w-full h-full"/>
<text> <view>
{{ props.title }} <text>
</text> {{ props.title }}
</text>
</view>
</view> </view>
</template> </template>

View File

@ -11,7 +11,7 @@
</view> </view>
</view> </view>
<swiper indicator-dots circular :autoplay="false" class="banner"> <swiper indicator-dots circular :autoplay="false" class="banner w-full">
<swiper-item> <swiper-item>
<view style="display: grid;grid-template-columns: repeat(5, 1fr);"> <view style="display: grid;grid-template-columns: repeat(5, 1fr);">
<category-item src="https://www.httpbin.org/image/png" title="美食"></category-item> <category-item src="https://www.httpbin.org/image/png" title="美食"></category-item>
@ -29,7 +29,7 @@
</swiper-item> </swiper-item>
<swiper-item v-for="item in pic.list" :key="item.id"> <swiper-item v-for="item in pic.list" :key="item.id">
<image @tap="previewImage(item)" :src="item.url"></image> <image @tap="previewImage(item)" :src="item.url" class="w-full h-full"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -122,10 +122,9 @@ export default {
} }
</script> </script>
<style> <style>
.banner, .banner {
.banner image {
width: 750rpx; width: 750rpx;
height: 450rpx; height: 420rpx;
} }
.content { .content {