huangsijun
2025-09-22 a78c011de350b188afb03beb2f26a73f35f71986
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<template>
    <view class="diy-notice pr"
        :style="{ padding: itemData.style.paddingTop + 'px' + ' 10px', background: itemData.style.background }"
        @click="gotoPages(item)">
        <view class="notice-icon pr" :style="{background: itemData.style.background }"
            v-if="itemData.params.show_icon=='yes'">
            <image :src="itemData.params.icon" mode="aspectFill"></image>
        </view>
        <text class="pr notice-text text-ellipsisss f38 fb"
            :style="{background: itemData.style.background, color: itemData.style.textColor }">
            {{ itemData.params.title }}
        </text>
        <view class="center-line"></view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {};
        },
        props: ['itemData'],
        created() {},
        methods: {
            /*跳转页面*/
            gotoPages(e) {
                this.gotoPage(e.linkUrl);
            }
        }
    };
</script>
 
<style>
    .diy-notice {
        display: flex;
        justify-content: center;
        align-items: center;
    }
 
    .diy-notice .notice-icon {
        width: 26px;
        height: 26px;
        background-color: #FFFFFF;
        padding: 0 10rpx;
        z-index: 1;
    }
 
    .diy-notice .notice-icon image {
        width: 100%;
        height: 100%;
    }
 
    .diy-notice .notice-text {
        overflow: hidden;
        white-space: nowrap;
        background-color: #FFFFFF;
        padding: 0 10rpx;
        z-index: 1;
    }
    .center-line{
        width: 490rpx;
        height: 2rpx;
        background-color: #c7c7c7;
        border-radius: 2rpx;
        position: absolute;
        left: 0;
        bottom: 0;
        top: 0;
        right: 0;
        margin: auto;
        z-index: 0;
    }
</style>