Skip to content

Commit

Permalink
fix:修改loadmore组件中的加载图标由之前的固定大小 17 改为添加 iconSize 属性来自定义图标大小以满足更多需求
Browse files Browse the repository at this point in the history
  • Loading branch information
EarlySummer2018 authored and BeiQiaoT committed May 11, 2022
1 parent 5339d0e commit ba2dddb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pages/componentsC/loadmore/loadmore.nvue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<view class="u-demo-block__content">
<u-loadmore
status="loading"
:isDot="true"
:isDot="true"
:iconSize="17"
></u-loadmore>
</view>
</view>
Expand Down
5 changes: 5 additions & 0 deletions uni_modules/uview-ui/components/u-loadmore/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ export default {
type: [String, Number],
default: uni.$u.props.loadmore.fontSize
},
// 图标大小
iconSize: {
type: [String, Number],
default: uni.$u.props.loadmore.iconSize
},
// 字体颜色
color: {
type: String,
Expand Down
3 changes: 2 additions & 1 deletion uni_modules/uview-ui/components/u-loadmore/u-loadmore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
>
<u-loading-icon
:color="iconColor"
size="17"
:size="iconSize"
:mode="loadingIcon"
></u-loading-icon>
</view>
Expand Down Expand Up @@ -60,6 +60,7 @@
* @property {String} bgColor 组件背景颜色,在页面是非白色时会用到(默认 'transparent' )
* @property {Boolean} icon 加载中时是否显示图标(默认 true )
* @property {String | Number} fontSize 字体大小(默认 14 )
* @property {String | Number} iconSize 图标大小(默认 17 )
* @property {String} color 字体颜色(默认 '#606266' )
* @property {String} loadingIcon 加载图标(默认 'circle' )
* @property {String} loadmoreText 加载前的提示语(默认 '加载更多' )
Expand Down
1 change: 1 addition & 0 deletions uni_modules/uview-ui/libs/config/props/loadmore.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default {
bgColor: 'transparent',
icon: true,
fontSize: 14,
iconSize: 17,
color: '#606266',
loadingIcon: 'spinner',
loadmoreText: '加载更多',
Expand Down

0 comments on commit ba2dddb

Please sign in to comment.