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
| <template>
| <div class="layout">
| <div class="background">
| <u-notice-bar mode="vertical" :bg-color="res.list[0].bk_color" :color="res.list[0].color" :list="list"></u-notice-bar>
| </div>
| </div>
| </template>
|
| <script>
| import '@/components/uview-components/uview-ui'
| export default {
| title: "公告",
| props: ["res"],
| data() {
| return {
| list: []
| }
| },
| mounted() {
| this.list = this.res.list[0].title.map(i => i.context);
| },
| };
| </script>
| <style lang="scss" scoped>
| @import "./tpl.scss";
| .background {
| position: absolute;
| z-index: 2;
| width: 100%;
| height: 84rpx;
| text-align: left;
| font-size: 20rpx;
| 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: 20px;
| font-weight: bold;
| }
| </style>
|
|