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:
39
src/pages/home/components/DiscoveryCradContentList/index.vue
Normal file
39
src/pages/home/components/DiscoveryCradContentList/index.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<ModuleTitle :title="recommendTheme.themeName" />
|
||||
<div class="container-scroll">
|
||||
<div v-for="(item, index) in recommendTheme.recommendPostsList" :key="index">
|
||||
<div class="mk-card-item" @click="sendReply(item)">
|
||||
<img class="card-img" :src="item.coverPhoto" mode="widthFix"></img>
|
||||
<span class="card-text">{{ item.topic }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { SEND_MESSAGE_CONTENT_TEXT, SEND_MESSAGE_COMMAND_TYPE } from "@/constant/constant";
|
||||
import { defineProps } from "vue";
|
||||
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,33 @@
|
||||
.container {
|
||||
.container-scroll {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow-x: auto;
|
||||
margin-top: 4px;
|
||||
|
||||
.mk-card-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
width: 188px;
|
||||
height: 154px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
|
||||
.card-img {
|
||||
width: 188px;
|
||||
height: 112px;
|
||||
}
|
||||
|
||||
.card-text {
|
||||
padding: 12px;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
font-size: $uni-font-size-sm;
|
||||
color: $uni-text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user