Files
YGChatCS/src/pages/ChatModule/RecommendPostsList/index.vue
duanshuwen 0883d2b9c9 refactor: replace rounded utility classes and clean up unused scss files
Removed unused text-align.scss, position.scss, and rounded.scss utility files along with their imports from scss/index.scss. Updated all existing uses of the rounded-* utility classes in vue components to use inline border-radius syntax like rounded-[10px] instead.
2026-07-24 21:46:42 +08:00

49 lines
1.4 KiB
Vue

<template>
<view class="container">
<ModuleTitle :title="recommendTheme.themeName" />
<view class="container-scroll font-size-0 scroll-x whitespace-nowrap">
<view class="card-item bg-white inline-block rounded-[20px] mr-8"
v-for="(item, index) in recommendTheme.recommendPostsList" :key="index" @click="sendReply(item)">
<view class="m-4 relative">
<image class="card-img rounded-[16px] relative z-10" :src="item.coverPhoto" mode="aspectFill" />
<view class="shadow absolute rounded-[16px]"></view>
</view>
<view class="card-text border-box">
<view class="font-size-11 text-[#99a0ae] ellipsis-1">
{{ item.topic }}
</view>
</view>
</view>
</view>
</view>
</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>