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
74
75
76
77
78
79
80
81
82
83
<template>
<view>
<view v-if="style_setting.styleType === 1" class="maintitle_content1" :style="{'height': style_setting.titleHeight*2+'rpx','line-height': style_setting.titleHeight*2+'rpx','background-color':style_setting.bg_color,'padding-top':style_setting.padding_top*2+'rpx','padding-bottom':style_setting.padding_bottom*2+'rpx',}">
<view>
<i class="main_icon" :style="{'background-image':'url('+style_setting.icon_url+')'}" v-if="style_setting.iconShow === 1"></i>
<text class="main_title" :style="{'font-size':style_setting.title_font_size*2+'rpx','color':style_setting.title_color}">{{style_setting.title}}</text>
<text class="main_sub_title" :style="{'font-size': style_setting.sub_title_font_size*2+'rpx','color':style_setting.sub_title_color}">{{style_setting.sub_title}}</text>
</view>
<text v-if="style_setting.view_more_show" :style="{'font-size':style_setting.view_more_font_size*2+'rpx','color': style_setting.view_more_color}" @click="$jump(style_setting.view_more_link)">{{style_setting.view_more_font_title}}
<svg viewBox="64 64 896 896" class="" data-icon="right" width="1em" height="1em" fill="currentColor" aria-hidden="true" focusable="false"><path d="M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z"></path></svg>
</text>
</view>
<view v-if="style_setting.styleType === 2" class="maintitle_content2" :style="{'height': style_setting.titleHeight*2+'rpx','line-height': style_setting.titleHeight*2+'rpx','background-color':style_setting.bg_color,'padding-top':style_setting.padding_top*2+'rpx','padding-bottom':style_setting.padding_bottom*2+'rpx',}">
<view class="main_title" :style="{'font-size':style_setting.title_font_size*2+'rpx','color':style_setting.title_color, 'height':style_setting.title_font_size*2+'rpx'}">{{style_setting.title}}</view>
<view class="main_sub_title" :style="{'font-size': style_setting.sub_title_font_size*2+'rpx','color':style_setting.sub_title_color,'height':style_setting.sub_title_font_size*2+'rpx'}">{{style_setting.sub_title}}</view>
</view>
</view>
</template>
<script>
export default {
props: {
wrapper_props: {
type: Object
}
},
data() {
return {
style_setting: this.wrapper_props.style_setting
}
},
methods: {
jumpPage(url) {
}
}
}
</script>
<style lang="less" scoped>
.maintitle_content1 {
width: 702rpx;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 16rpx 16rpx 0 0;
padding: 0 24rpx;
box-sizing: border-box;
text {
vertical-align: middle;
margin-left: 10rpx;
}
}
.maintitle_content2 {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-radius: 16rpx 16rpx 0 0;
width: 702rpx;
margin: 0 auto;
box-sizing: border-box;
view {
line-height: initial;
height: 50%;
}
view:nth-of-type(2) {
margin-top: 10rpx;
}
}
.main_icon {
display: inline-block;
width: 52rpx;
height: 52rpx;
vertical-align: middle;
background-size: 100% 100%;
background-repeat: no-repeat;
}
.main_title {
font-family: PingFangSC-Medium,PingFang SC;
}
</style>