feat: 调整为使用统一标题组件

This commit is contained in:
2025-08-02 18:35:24 +08:00
parent 92cbcc2ebe
commit ef413eb872
6 changed files with 17 additions and 77 deletions

View File

@@ -1,11 +1,8 @@
<template>
<view class="container">
<view class="mk-title">
<text class="title"> {{ commodityDTO.title }}</text>
<image class="wave" src="@/static/wave_icon.png" mode="widthFix"/>
</view>
<ModuleTitle :title="commodityDTO.title" />
<view class="container-scroll">
<view class="mk-card-item" v-for="(item, index) in commodityDTO.commodityList" :key="item.commodityName">
<view class="mk-card-item" v-for="(item) in commodityDTO.commodityList" :key="item.commodityName">
<view class="card-badge">超值推荐</view>
<image class="card-img" :src="item.commodityIcon" mode="widthFix" />
<view class="card-content">
@@ -34,6 +31,7 @@
</template>
<script setup>
import ModuleTitle from '@/components/ModuleTitle/index.vue'
import { defineProps } from 'vue'
const props = defineProps({
commodityDTO: {
@@ -46,26 +44,7 @@
<style lang="scss" scoped>
.container {
.mk-title {
padding: 4px 0;
display: inline-block;
position: relative;
.title {
font-weight: 400;
font-size: 16px;
color: #000000;
z-index: 2;
position: relative;
}
.wave {
position: absolute;
bottom: 2px;
left: 0;
width: 100%;
z-index: 1;
}
}
.container-scroll {
display: flex;
flex-direction: row;

View File

@@ -1,9 +1,6 @@
<template>
<view class="container">
<view class="mk-title">
<text class="title"> {{ recommendTheme.themeName }}</text>
<image class="wave" src="@/static/wave_icon.png" mode="widthFix"/>
</view>
<ModuleTitle :title="recommendTheme.themeName" />
<view class="container-scroll">
<view class="mk-card-item" v-for="(item, index) in recommendTheme.recommendPostsList" :key="index">
<image :src="item.coverPhoto" mode="widthFix"></image>
@@ -14,6 +11,8 @@
</template>
<script setup>
import ModuleTitle from '@/components/ModuleTitle/index.vue'
import { defineProps } from 'vue'
const props = defineProps({
recommendTheme: {
@@ -26,25 +25,6 @@
<style lang="scss" scoped>
.container {
.mk-title {
padding: 4px 0;
display: inline-block;
position: relative;
.title {
font-weight: 400;
font-size: 16px;
color: #000000;
z-index: 2;
position: relative;
}
.wave {
position: absolute;
bottom: 2px;
left: 0;
width: 100%;
z-index: 1;
}
}
.container-scroll {
display: flex;

View File

@@ -1,9 +1,6 @@
<template>
<view class="container">
<view class="mk-title">
<text class="title"> {{ recommendTheme.themeName }}</text>
<image class="wave" src="@/static/wave_icon.png" mode="widthFix"/>
</view>
<ModuleTitle :title="recommendTheme.themeName" />
<view class="container-scroll">
<view class="mk-card-item" v-for="(item, index) in recommendTheme.recommendPostsList" :key="index">
<image :src="item.coverPhoto" mode="widthFix"></image>
@@ -14,6 +11,7 @@
</template>
<script setup>
import ModuleTitle from '@/components/ModuleTitle/index.vue'
import { defineProps } from 'vue'
const props = defineProps({
recommendTheme: {
@@ -26,25 +24,6 @@
<style lang="scss" scoped>
.container {
.mk-title {
padding: 4px 0;
display: inline-block;
position: relative;
.title {
font-weight: 400;
font-size: 16px;
color: #000000;
z-index: 2;
position: relative;
}
.wave {
position: absolute;
bottom: 2px;
left: 0;
width: 100%;
z-index: 1;
}
}
.container-scroll {
display: flex;