feat: 商品详情的位置背景
This commit is contained in:
BIN
components/LocationCard/images/loc_bg_img.png
Normal file
BIN
components/LocationCard/images/loc_bg_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
components/LocationCard/images/loc_icon_img.png
Normal file
BIN
components/LocationCard/images/loc_icon_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -1,8 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="store-address" @click="openMap">
|
<view class="store-address" @click="openMap">
|
||||||
<text class="location-label">位于 [{{ orderData.commodityAddress }}]</text>
|
<view class="text-container">
|
||||||
|
<text class="location-label"
|
||||||
|
>位于 [{{ orderData.commodityAddress }}]</text
|
||||||
|
>
|
||||||
<text class="address-text">{{ orderData.commodityAddress }}</text>
|
<text class="address-text">{{ orderData.commodityAddress }}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<image
|
||||||
|
class="loc-icon"
|
||||||
|
src="./images/loc_icon_img.png"
|
||||||
|
mode="aspectFit"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
.store-address {
|
.store-address {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: start;
|
align-items: center;
|
||||||
flex-direction: column;
|
|
||||||
padding: 16px 12px;
|
padding: 16px 12px;
|
||||||
background-color: #f0f0f0;
|
background-color: #f8f9fa;
|
||||||
background-image: url(""); // 预留背景图片位置,用户手动导入
|
background-image: url("./images/loc_bg_img.png"); // 预留背景图片位置,用户手动导入
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333;
|
color: #333;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -25,9 +25,19 @@
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 左侧文本容器
|
||||||
|
.text-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex: 1;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
// 确保内容在遮罩层之上
|
// 确保内容在遮罩层之上
|
||||||
.location-label,
|
.location-label,
|
||||||
.address-text {
|
.address-text,
|
||||||
|
.loc-icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
@@ -35,15 +45,20 @@
|
|||||||
.location-label {
|
.location-label {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-right: 4px;
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address-text {
|
.address-text {
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
flex: 1;
|
|
||||||
color: #666;
|
color: #666;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 右侧图标样式
|
||||||
|
.loc-icon {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
margin-left: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user