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:
48
src/pages/home/components/RecommendPostsList/index.vue
Normal file
48
src/pages/home/components/RecommendPostsList/index.vue
Normal file
@@ -0,0 +1,48 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<ModuleTitle :title="recommendTheme.themeName" />
|
||||
|
||||
<div class="container-scroll font-size-0 scroll-x whitespace-nowrap">
|
||||
<div class="card-item bg-white inline-block rounded-20 mr-8"
|
||||
v-for="(item, index) in recommendTheme.recommendPostsList" :key="index" @click="sendReply(item)">
|
||||
<div class="m-4 relative">
|
||||
<img class="card-img rounded-16 relative z-10" :src="item.coverPhoto" mode="aspectFill" />
|
||||
|
||||
<div class="shadow absolute rounded-16"></div>
|
||||
</div>
|
||||
|
||||
<div class="card-text border-box">
|
||||
<div class="font-size-11 color-99A0AE ellipsis-1">
|
||||
{{ item.topic }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps } from "vue";
|
||||
import { SEND_MESSAGE_CONTENT_TEXT, SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
|
||||
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
||||
|
||||
const props = defineProps({
|
||||
recommendTheme: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
});
|
||||
|
||||
const sendReply = (item) => {
|
||||
if (item.userInputContentType && item.userInputContentType === '1') {
|
||||
const commonItem = { type: item.userInputContent, title: item.topic }
|
||||
uni.$emit(SEND_MESSAGE_COMMAND_TYPE, commonItem);
|
||||
return;
|
||||
}
|
||||
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item.userInputContent);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./styles/index.scss";
|
||||
</style>
|
||||
@@ -0,0 +1,26 @@
|
||||
.container-scroll {
|
||||
margin: 4px 0 6px;
|
||||
}
|
||||
|
||||
.card-item {
|
||||
width: 128px;
|
||||
}
|
||||
|
||||
.card-img {
|
||||
height: 120px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
background-color: #e5e8ee;
|
||||
height: 96px;
|
||||
width: 96px;
|
||||
bottom: -4px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.card-text {
|
||||
padding: 4px 8px 8px;
|
||||
}
|
||||
Reference in New Issue
Block a user