绿满眶商城微信小程序-uniapp
zxl
9 天以前 b303b6945a139153688e86635346a621fe0c29b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<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>
import { modelNavigateTo } from "./tpl";
export default {
  title: "标题栏",
  props: ["res"],
  data() {
    return {
      modelNavigateTo,
    };
  },
  mounted() {},
};
</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>