Skip to content

Commit 01ed14f

Browse files
committed
新增:Section是否显示右侧箭头
1 parent a9758b9 commit 01ed14f

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

uview-ui/components/u-section/u-section.vue

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
</view>
1616
<view class="u-section__right-info" v-if="right" :style="{
1717
color: subColor
18-
}" @tap="rightClick">
18+
}" @tap="rightClick">
1919
{{subTitle}}
2020
<view class="u-section__right-info__icon-arrow u-flex">
21-
<u-icon name="arrow-right" size="24" :color="subColor"></u-icon>
21+
<u-icon v-if="arrow" name="arrow-right" size="24" :color="subColor"></u-icon>
2222
</view>
2323
</view>
2424
</view>
@@ -36,6 +36,7 @@
3636
* @property {String Number} font-size 主标题的字体大小(默认28)
3737
* @property {Boolean} bold 主标题是否加粗(默认true)
3838
* @property {String} color 主标题颜色(默认#303133)
39+
* @property {Boolean} arrow 是否显示右侧箭头(默认true)
3940
* @event {Function} click 组件右侧的内容被点击时触发,用于跳转"更多"
4041
* @example <u-section title="今日热门" :right="false"></u-section>
4142
*/
@@ -85,6 +86,11 @@
8586
lineColor: {
8687
type: String,
8788
default: ''
89+
},
90+
// 是否显示右侧箭头
91+
arrow: {
92+
type: Boolean,
93+
default: true
8894
}
8995
},
9096
computed: {
@@ -108,35 +114,35 @@
108114

109115
<style lang="scss" scoped>
110116
@import "../../libs/css/style.components.scss";
111-
117+
112118
.u-section {
113119
display: flex;
114120
justify-content: space-between;
115121
align-items: center;
116122
width: 100%;
117-
123+
118124
&__title {
119125
position: relative;
120126
font-size: 28rpx;
121127
padding-left: 20rpx;
122128
display: flex;
123129
align-items: center;
124-
130+
125131
&__icon-wrap {
126132
position: absolute;
127133
}
128-
134+
129135
&__text {
130136
line-height: 1;
131137
}
132138
}
133-
139+
134140
&__right-info {
135141
color: $u-tips-color;
136142
font-size: 26rpx;
137143
display: flex;
138144
align-items: center;
139-
145+
140146
&__icon-arrow {
141147
margin-left: 6rpx;
142148
}

0 commit comments

Comments
 (0)