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
84
| <template>
| <view class="title">
| <view class="title_wrapper">
| <!-- 开始 -->
| <view class="title_start">
| <view class="icon">
| </view>
| <view class="text">
| {{title}}
| </view>
| </view>
|
| <!-- 结尾 -->
| <view class="title_end" v-if="detailsPath != ''">
| <view class="title_end_text" @click="toDetailsPath">
| <text>更多</text>
| </view>
| </view>
| </view>
| </view>
| </template>
|
| <script>
| export default {
| name:"combined-title",
| data() {
| return {
|
| };
| },
| props:{
| title:{
| type:String,
| default:''
| },
| detailsPath:{
| type:String,
| default:''
| }
| },
| methods:{
| toDetailsPath(){
| uni.navigateTo({
| url:this.detailsPath
| })
| }
| }
| }
| </script>
|
| <style lang="scss" scope>
| .title{
| width:91%;
| margin:vww(16) auto ;
| .title_wrapper{
| height:vww(14);
| display:flex;
| justify-content: space-between;
| align-items: center;
| box-sizing: border-box;
| .title_start{
| .icon{
| display:inline-block;
| width:vww(4);
| height:vww(12);
| background-color: #007AFF;
| border-radius: vww(2);
| }
| .text{
| display:inline-block;
| margin-left:vww(8);
| font-size: vww(14);
| }
| }
| .title_end{
| .title_end_text{
| text{
| font-size: vww(14);
| }
| }
| }
| }
| }
| </style>
|
|