mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-08-06 19:07:23 +08:00
- 将多个组件转换为 `<script setup>` 语法,提升可读性和性能 - 优化状态管理和事件处理逻辑,简化代码结构 - 更新样式和布局以适应新组件结构 - 添加新功能和修复已知问题,提升用户体验
51 lines
1.2 KiB
Vue
51 lines
1.2 KiB
Vue
<template>
|
|
<div class="layout" :style="{textAlign: res.list[0].textAlign}" @click="modelNavigateTo(res.list[0])" >
|
|
<div class="background" :style="{ backgroundColor: res.list[0].bk_color}">
|
|
<div class="title" :style="{ color: res.list[0].color }">
|
|
{{ res.list[0].title }}
|
|
</div>
|
|
<div style="position: absolute;right: 10px;top:2px;color: #fff;line-height: 42px;font-size: 10px">
|
|
<a :style="{ color: res.list[0].color1 }" style="text-decoration: none">{{ res.list[0].title1 }}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
import { modelNavigateTo } from "./tpl";
|
|
|
|
defineProps<{ res: any }>();
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
@import "./tpl.scss";
|
|
.background {
|
|
// background: url("/static/title.png") no-repeat;
|
|
position: absolute;
|
|
z-index: 2;
|
|
width: 100%;
|
|
height: 84rpx;
|
|
background-position-x: center;
|
|
background-position-y: center;
|
|
background-size: cover;
|
|
}
|
|
|
|
.layout {
|
|
text-align: center;
|
|
position: relative;
|
|
height: 84rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
background: #ffffff;
|
|
}
|
|
|
|
.title {
|
|
line-height: 84rpx;
|
|
font-size: 30rpx;
|
|
font-weight: bold;
|
|
margin-left: 8rpx;
|
|
}
|
|
</style>
|