Skip to content

Commit 4168a71

Browse files
committed
初始化:cli项目
1 parent 01ed14f commit 4168a71

File tree

3 files changed

+109
-109
lines changed

3 files changed

+109
-109
lines changed

uview-ui/components/u-dropdown-list/u-dropdown-list.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default {
108108
type: String,
109109
default: 'none'
110110
},
111-
//top rpx 选择框高度也用这个值
111+
//rpx 选择框高度也用这个值
112112
top: {
113113
type: Number,
114114
default: 90

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@
525525
style += '</style>';
526526
html = style + html;
527527
}
528-
// 处理 rpx
528+
// 处理rpx
529529
if (html.includes('rpx'))
530530
html = html.replace(/[0-9.]+\s*rpx/g, $ => (parseFloat($) * windowWidth / 750) + 'px');
531531
return html;

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

Lines changed: 107 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -17,135 +17,135 @@
1717
color: subColor
1818
}" @tap="rightClick">
1919
{{subTitle}}
20-
<view class="u-section__right-info__icon-arrow u-flex">
21-
<u-icon v-if="arrow" name="arrow-right" size="24" :color="subColor"></u-icon>
20+
<view class="u-section__right-info__icon-arrow u-flex" v-if="arrow">
21+
<u-icon name="arrow-right" size="24" :color="subColor"></u-icon>
2222
</view>
2323
</view>
2424
</view>
2525
</template>
2626

2727
<script>
28-
/**
29-
* section 查看更多
30-
* @description 该组件一般用于分类信息有很多,但是限于篇幅只能列出一部分,让用户通过"查看更多"获得更多信息的场景,实际效果见演示。
31-
* @tutorial https://www.uviewui.com/components/section.html
32-
* @property {String} title 左边主标题
33-
* @property {String} sub-title 右边副标题(默认更多)
34-
* @property {Boolean} right 是否显示右边的内容(默认true)
35-
* @property {Boolean} showLine 是否显示左边的竖条(默认true)
36-
* @property {String Number} font-size 主标题的字体大小(默认28)
37-
* @property {Boolean} bold 主标题是否加粗(默认true)
38-
* @property {String} color 主标题颜色(默认#303133)
39-
* @property {Boolean} arrow 是否显示右侧箭头(默认true)
40-
* @event {Function} click 组件右侧的内容被点击时触发,用于跳转"更多"
41-
* @example <u-section title="今日热门" :right="false"></u-section>
42-
*/
43-
export default {
44-
name: "u-section",
45-
props: {
46-
// 标题信息
47-
title: {
48-
type: String,
49-
default: ''
50-
},
51-
// 右边副标题内容
52-
subTitle: {
53-
type: String,
54-
default: '更多'
55-
},
56-
// 是否显示右边的内容
57-
right: {
58-
type: Boolean,
59-
default: true
60-
},
61-
fontSize: {
62-
type: [Number, String],
63-
default: 28
64-
},
65-
// 主标题是否加粗
66-
bold: {
67-
type: Boolean,
68-
default: true
69-
},
70-
// 主标题的颜色
71-
color: {
72-
type: String,
73-
default: '#303133'
74-
},
75-
// 右边副标题的颜色
76-
subColor: {
77-
type: String,
78-
default: '#909399'
79-
},
80-
// 是否显示左边的竖条
81-
showLine: {
82-
type: Boolean,
83-
default: true
84-
},
85-
// 左边竖线的颜色
86-
lineColor: {
87-
type: String,
88-
default: ''
89-
},
90-
// 是否显示右侧箭头
91-
arrow: {
92-
type: Boolean,
93-
default: true
94-
}
28+
/**
29+
* section 查看更多
30+
* @description 该组件一般用于分类信息有很多,但是限于篇幅只能列出一部分,让用户通过"查看更多"获得更多信息的场景,实际效果见演示。
31+
* @tutorial https://www.uviewui.com/components/section.html
32+
* @property {String} title 左边主标题
33+
* @property {String} sub-title 右边副标题(默认更多)
34+
* @property {Boolean} right 是否显示右边的内容(默认true)
35+
* @property {Boolean} arrow 是否显示右边箭头(默认true)
36+
* @property {Boolean} showLine 是否显示左边的竖条(默认true)
37+
* @property {String Number} font-size 主标题的字体大小(默认28)
38+
* @property {Boolean} bold 主标题是否加粗(默认true)
39+
* @property {String} color 主标题颜色(默认#303133)
40+
* @event {Function} click 组件右侧的内容被点击时触发,用于跳转"更多"
41+
* @example <u-section title="今日热门" :right="false"></u-section>
42+
*/
43+
export default {
44+
name: "u-section",
45+
props: {
46+
// 标题信息
47+
title: {
48+
type: String,
49+
default: ''
9550
},
96-
computed: {
97-
// 左边竖条的样式
98-
lineStyle() {
99-
// 由于安卓和iOS的,需要稍微调整绝对定位的top值,才能让左边的竖线和右边的文字垂直居中
100-
return {
101-
// 由于竖线为字体图标,具有比实际线宽更宽的宽度,所以也需要根据字体打下动态调整
102-
left: -(Number(this.fontSize) * 0.9) + 'rpx',
103-
top: -(Number(this.fontSize) * (this.$u.os == 'ios' ? 0.14 : 0.15)) + 'rpx',
104-
}
105-
}
51+
// 右边副标题内容
52+
subTitle: {
53+
type: String,
54+
default: '更多'
55+
},
56+
// 是否显示右边的内容
57+
right: {
58+
type: Boolean,
59+
default: true
60+
},
61+
fontSize: {
62+
type: [Number, String],
63+
default: 28
64+
},
65+
// 主标题是否加粗
66+
bold: {
67+
type: Boolean,
68+
default: true
69+
},
70+
// 主标题的颜色
71+
color: {
72+
type: String,
73+
default: '#303133'
74+
},
75+
// 右边副标题的颜色
76+
subColor: {
77+
type: String,
78+
default: '#909399'
79+
},
80+
// 是否显示左边的竖条
81+
showLine: {
82+
type: Boolean,
83+
default: true
84+
},
85+
// 左边竖线的颜色
86+
lineColor: {
87+
type: String,
88+
default: ''
89+
},
90+
// 是否显示右边箭头
91+
arrow: {
92+
type: Boolean,
93+
default: true
10694
},
107-
methods: {
108-
rightClick() {
109-
this.$emit('click');
95+
},
96+
computed: {
97+
// 左边竖条的样式
98+
lineStyle() {
99+
// 由于安卓和iOS的,需要稍微调整绝对定位的top值,才能让左边的竖线和右边的文字垂直居中
100+
return {
101+
// 由于竖线为字体图标,具有比实际线宽更宽的宽度,所以也需要根据字体打下动态调整
102+
left: -(Number(this.fontSize) * 0.9) + 'rpx',
103+
top: -(Number(this.fontSize) * (this.$u.os == 'ios' ? 0.14 : 0.15)) + 'rpx',
110104
}
111105
}
106+
},
107+
methods: {
108+
rightClick() {
109+
this.$emit('click');
110+
}
112111
}
112+
}
113113
</script>
114114

115115
<style lang="scss" scoped>
116-
@import "../../libs/css/style.components.scss";
116+
@import "../../libs/css/style.components.scss";
117+
118+
.u-section {
119+
display: flex;
120+
justify-content: space-between;
121+
align-items: center;
122+
width: 100%;
117123
118-
.u-section {
124+
&__title {
125+
position: relative;
126+
font-size: 28rpx;
127+
padding-left: 20rpx;
119128
display: flex;
120-
justify-content: space-between;
121129
align-items: center;
122-
width: 100%;
123-
124-
&__title {
125-
position: relative;
126-
font-size: 28rpx;
127-
padding-left: 20rpx;
128-
display: flex;
129-
align-items: center;
130130
131-
&__icon-wrap {
132-
position: absolute;
133-
}
131+
&__icon-wrap {
132+
position: absolute;
133+
}
134134
135-
&__text {
136-
line-height: 1;
137-
}
135+
&__text {
136+
line-height: 1;
138137
}
138+
}
139139
140-
&__right-info {
141-
color: $u-tips-color;
142-
font-size: 26rpx;
143-
display: flex;
144-
align-items: center;
140+
&__right-info {
141+
color: $u-tips-color;
142+
font-size: 26rpx;
143+
display: flex;
144+
align-items: center;
145145
146-
&__icon-arrow {
147-
margin-left: 6rpx;
148-
}
146+
&__icon-arrow {
147+
margin-left: 6rpx;
149148
}
150149
}
150+
}
151151
</style>

0 commit comments

Comments
 (0)