feat: update AigcPhotoCard, FaqHelpCard, MapNavigationCard, NoticeCard, ScenicImageCard with new layouts, styles, and mock data; enhance user interaction and visual appeal
This commit is contained in:
@@ -1,24 +1,40 @@
|
||||
<template>
|
||||
<CardShell class="map-navigation-card" variant="soft">
|
||||
<view class="map-navigation-card__map">
|
||||
<MediaFrame class="map-navigation-card__image h-178" :src="data.mapImage" />
|
||||
<view class="map-navigation-card__pin color-334155 font-size-10 font-900">{{ data.pinText }}</view>
|
||||
<view class="map-navigation-card bg-white rounded-24 overflow-hidden w-full">
|
||||
<view class="map-navigation-card__media">
|
||||
<image
|
||||
class="map-navigation-card__image block w-full"
|
||||
:src="data.image"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="map-navigation-card__badge flex flex-items-center color-white font-size-12 font-900">
|
||||
<text class="map-navigation-card__badge-icon">{{ badge.icon }}</text>
|
||||
<text>{{ badge.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="map-navigation-card__bar flex flex-items-center gap-12">
|
||||
|
||||
<view class="map-navigation-card__content flex flex-items-center">
|
||||
<view class="map-navigation-card__info flex-full">
|
||||
<view class="map-navigation-card__title color-1E293B font-size-14 font-900 ellipsis-1">{{ data.title }}</view>
|
||||
<view class="map-navigation-card__distance color-94A3B8 font-size-11 font-800 ellipsis-1">{{ data.distance }}</view>
|
||||
<view class="map-navigation-card__title color-1E293B font-size-18 font-900 ellipsis-1">
|
||||
{{ data.title }}
|
||||
</view>
|
||||
<view class="map-navigation-card__distance color-94A3B8 font-size-14 font-900 ellipsis-1">
|
||||
{{ data.distance }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="map-navigation-card__button rounded-50 color-white bg-0F172A font-size-12 font-900" :class="{ 'is-disabled': disabled }" @click="handleAction">
|
||||
{{ data.buttonText }}
|
||||
<view
|
||||
class="map-navigation-card__button flex flex-items-center flex-justify-center bg-0F172A color-white font-size-18 font-900"
|
||||
:class="{ 'is-disabled': disabled }"
|
||||
@click="handleAction"
|
||||
>
|
||||
<text class="map-navigation-card__button-icon">{{ action.icon }}</text>
|
||||
<text>{{ action.text }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</CardShell>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import CardShell from "../SharedVisual/CardShell.vue";
|
||||
import MediaFrame from "../SharedVisual/MediaFrame.vue";
|
||||
import { computed } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
@@ -33,6 +49,9 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(["select", "action"]);
|
||||
|
||||
const badge = computed(() => props.data.badge || {});
|
||||
const action = computed(() => props.data.action || {});
|
||||
|
||||
const handleAction = () => {
|
||||
if (props.disabled) return;
|
||||
emit("select", props.data);
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
export default {
|
||||
mapImage: "https://images.unsplash.com/photo-1524661135-423995f22d0b?auto=format&fit=crop&w=900&q=80",
|
||||
pinText: "目的地",
|
||||
title: "前往翠谷瀑布",
|
||||
distance: "距你 500m · 步行约 8 分钟",
|
||||
buttonText: "导航",
|
||||
id: "xiaoqikong-bridge-nav",
|
||||
title: "前往小七孔桥",
|
||||
image: "https://images.unsplash.com/photo-1500534314209-a25ddb2bd429?auto=format&fit=crop&w=1000&q=80",
|
||||
distance: "步行约 450 米",
|
||||
badge: {
|
||||
icon: "⌖",
|
||||
text: "目的地",
|
||||
},
|
||||
action: {
|
||||
icon: "↗",
|
||||
text: "导航",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,22 +1,38 @@
|
||||
.map-navigation-card__map {
|
||||
.map-navigation-card {
|
||||
border: 1px solid rgba(226, 232, 240, 0.72);
|
||||
box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.map-navigation-card__media {
|
||||
position: relative;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.map-navigation-card__image {
|
||||
height: 248px;
|
||||
}
|
||||
|
||||
.map-navigation-card__pin {
|
||||
.map-navigation-card__badge {
|
||||
position: absolute;
|
||||
top: 18px;
|
||||
left: 18px;
|
||||
padding: 5px 9px;
|
||||
border-radius: 999px;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
left: 16px;
|
||||
bottom: 16px;
|
||||
height: 34px;
|
||||
padding: 0 12px;
|
||||
border-radius: 8px;
|
||||
background: rgba(15, 23, 42, 0.72);
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.map-navigation-card__bar {
|
||||
padding: 0 14px 14px;
|
||||
.map-navigation-card__badge-icon {
|
||||
margin-right: 6px;
|
||||
font-size: 15px;
|
||||
line-height: 15px;
|
||||
}
|
||||
|
||||
.map-navigation-card__content {
|
||||
min-height: 96px;
|
||||
padding: 20px 26px 22px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.map-navigation-card__info {
|
||||
@@ -24,16 +40,31 @@
|
||||
}
|
||||
|
||||
.map-navigation-card__title {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.map-navigation-card__distance {
|
||||
margin-top: 4px;
|
||||
margin-top: 6px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.map-navigation-card__button {
|
||||
padding: 9px 14px;
|
||||
width: 108px;
|
||||
height: 58px;
|
||||
margin-left: 18px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.map-navigation-card__button:active {
|
||||
opacity: 0.86;
|
||||
}
|
||||
|
||||
.map-navigation-card__button.is-disabled {
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.map-navigation-card__button-icon {
|
||||
margin-right: 8px;
|
||||
font-size: 19px;
|
||||
line-height: 19px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user