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
<template>
<view class="navigation" :style="[{'height': style_setting.height*2+'rpx', 'height': style_setting.height*2+'rpx'}, style_setting.bg_show ? {'background-image': 'url('+style_setting.bg_url+')'} : null, {'background-color': style_setting.bg_color}]">
<view>
<text class="navigation_item" v-for="(item, key) in list" :key="key" v-if="item.title_show">
<text class="navigation_text" :style="[{'color': item.title_color}, item.title_bg_show ? {'background-image': 'url('+item.title_bg_url+')'} : '']" @click="$jump(item.link)">
<i v-if="item.title_icon_show" class="navigation_icon" :style="{'background-image': 'url('+item.title_icon_url+')'}"></i>
<text>{{item.title}}</text>
</text>
</text>
</view>
</view>
</template>
<script>
export default {
props: {
wrapper_props: {
type: Object
}
},
data() {
return {
style_setting: this.wrapper_props.style_setting,
list: this.wrapper_props.list
}
}
}
</script>
<style lang="less" scoped>
.navigation {
display: flex;
align-items: center;
white-space: nowrap;
overflow: scroll;
background-repeat: no-repeat;
background-size: 100% 100%;
padding: 0 24rpx;
box-sizing: border-box;
border-right: 10rpx solid rgba(0,0,0,0.4);
.navigation_item {
width: 177.5rpx;
display: inline-block;
text-align: center;
}
.navigation_text {
background-size: 100% 100%;
background-repeat: no-repeat;
min-width: 120rpx;
height: 48rpx;
text-align: center;
display: inline-block;
font-size: 28rpx;
text {
vertical-align: middle;
}
.navigation_icon {
display: inline-block;
width: 32rpx;
height: 32rpx;
background-size: 100% 100%;
background-repeat: no-repeat;
vertical-align: middle;
margin-right: 8rpx;
}
}
}
.navigation::-webkit-scrollbar {
display: none;
}
</style>