feat: add new features, update theme and build config
- Add 40+ new UI components including chat modules, discovery cards, photo galleries, FAQ and booking tools - Standardize brand color across all styles by replacing $theme-color-500 SCSS variables with #0ccd58 - Add sass 1.58.3 dependency and update vite config for modern scss compiler support - Refactor existing components (AddCarCrad, login page) and remove unused /quick/list router route - Add utility functions for URL parameter handling - Add static assets including custom znicons font, component images and icons - Fix scss syntax issues and deprecation warnings
This commit is contained in:
58
src/pages/home/components/MapNavigationCard/index.vue
Normal file
58
src/pages/home/components/MapNavigationCard/index.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="map-navigation-card bg-white rounded-24 overflow-hidden w-full">
|
||||
<div class="map-navigation-card__media">
|
||||
<img class="map-navigation-card__image block w-full" :src="data.image" mode="aspectFill" />
|
||||
<div class="map-navigation-card__badge flex flex-items-center color-white font-size-12 font-900">
|
||||
<span class="map-navigation-card__badge-icon">{{ badge.icon }}</span>
|
||||
<span>{{ badge.text }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="map-navigation-card__content flex flex-items-center">
|
||||
<div class="map-navigation-card__info flex-full">
|
||||
<div class="map-navigation-card__title color-1E293B font-size-18 font-900 ellipsis-1">
|
||||
{{ data.title }}
|
||||
</div>
|
||||
<div class="map-navigation-card__distance color-94A3B8 font-size-14 font-900 ellipsis-1">
|
||||
{{ data.distance }}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
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">
|
||||
<span class="map-navigation-card__button-icon">{{ action.icon }}</span>
|
||||
<span>{{ action.text }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
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);
|
||||
emit("action", props.data);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
14
src/pages/home/components/MapNavigationCard/mocks.js
Normal file
14
src/pages/home/components/MapNavigationCard/mocks.js
Normal file
@@ -0,0 +1,14 @@
|
||||
export default {
|
||||
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: "导航",
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,70 @@
|
||||
.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;
|
||||
}
|
||||
|
||||
.map-navigation-card__image {
|
||||
height: 248px;
|
||||
}
|
||||
|
||||
.map-navigation-card__badge {
|
||||
position: absolute;
|
||||
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__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 {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.map-navigation-card__title {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.map-navigation-card__distance {
|
||||
margin-top: 6px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.map-navigation-card__button {
|
||||
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