Files
2026-08-22 10:08:07 +08:00

83 lines
1.6 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<!-- 为什么选择 Inkreach - Figma 1458:1492 -->
<view class="why-section">
<!-- 区块标题 - 20px Heavy #1A1A1A 居中 -->
<text class="section-title">为什么选择Inkrecah</text>
<!-- 2x2 网格 - 180x80 卡片 -->
<view class="why-grid">
<view class="why-card" v-for="(item, index) in reasons" :key="index">
<image class="why-icon" :src="item.icon" mode="aspectFit"></image>
<text class="why-title">{{ item.title }}</text>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'WhyChoose',
props: {
reasons: {
type: Array,
default: () => []
}
}
}
</script>
<style scoped>
/* 区块 - 灰色背景 #F8F8F8 */
.why-section {
width: 100%;
padding: 96rpx 0 80rpx 0;
background: #f8f8f8;
box-sizing: border-box;
}
/* 区块标题 - 20px Heavy #1A1A1A 居中 */
.section-title {
display: block;
text-align: center;
font-size: 40rpx;
font-weight: 900;
color: #1a1a1a;
line-height: 1.45;
margin-bottom: 64rpx;
}
/* 2x2 网格 - 自适应2列(避免宽度+间距同时固定导致挤压) */
.why-grid {
padding: 0 20rpx;
display: flex;
flex-wrap: wrap;
gap: 20rpx;
}
.why-card {
flex: 1 1 calc(50% - 10rpx);
min-width: 0;
height: 160rpx;
background: #ffffff;
border-radius: 12rpx;
margin-bottom: 20rpx;
padding: 0 40rpx;
box-sizing: border-box;
display: flex;
align-items: center;
gap: 12rpx;
}
/* 图标 26x26 */
.why-icon {
width: 52rpx;
height: 52rpx;
flex-shrink: 0;
}
/* 标题 - 16px Bold #000000 */
.why-title {
font-size: 32rpx;
font-weight: 700;
color: #000000;
line-height: 1.2;
}
</style>