更新记录
                                                                                                    
                                                    
                                                        1.0.0(2024-06-04)
                                                                                                                    
                                                                下载此版本
                                                            
                                                        
                                                    
                                                    初始化
                                                                                                                                                
                                            
                                                                                                                                                        平台兼容性
                                                                                                                                                                                                                                                                                                                                uni-app
                                                                                                                                                                                                                                    
| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 | 
| √ | √ | √ | √ | √ | - | - | - | - | 
                                                                                                                                                            
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 | 
| √ | - | - | - | - | - | - | - | - | - | - | 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                其他
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
                                            安装方式
本组件符合easycom规范,HBuilderX 2.5.5起,只需将本组件导入项目,在页面template中即可直接使用,无需在页面中import和注册components。
基本用法
在 template 中使用组件
<spring-buttons :dataList="list" @tapItem="handleTapItem"></spring-buttons>
设置列数 (3~5列显示效果较好)
<spring-buttons :dataList="list" :colNum="3" :scale="0.45" @tapItem="handleTapItem"></spring-buttons>
标题嵌入
        <spring-buttons :dataList="list" titleType="insert" :colNum="3" :scale="0.45"
    @tapItem="handleTapItem"></spring-buttons>
不显示标题左侧的竖块
            <spring-buttons :dataList="list" :showLine="false" titleType="insert" :colNum="3" :scale="0.45"
    @tapItem="handleTapItem"></spring-buttons>
不显示标题
            <spring-buttons :dataList="list" :showTitle="false" titleType="insert" :colNum="3" :scale="0.45"
    @tapItem="handleTapItem"></spring-buttons>
export default {
    data() {
        return {
            list: [{
                    icon: 'http://58.240.238.158:8100/images/service/icons-property/icon1.png',
                    name: '报障报修'
                },
                {
                    icon: 'http://58.240.238.158:8100/images/service/icons-property/icon3.png',
                    name: '临停车缴费'
                },
                {
                    icon: 'http://58.240.238.158:8100/images/service/icons-property/icon9.png',
                    name: '装修申请'
                },
                {
                    icon: 'http://58.240.238.158:8100/images/index/icon_3.png',
                    name: '园区动态'
                },
                {
                    icon: 'http://58.240.238.158:8100/images/service/icons-basic/icon32.png',
                    name: '水费充值'
                },
                {
                    icon: 'http://58.240.238.158:8100/images/service/icons-basic/icon29.png',
                    name: '电费充值'
                },
                {
                    icon: 'http://58.240.238.158:8100/images/service/icons-basic/icon34.png',
                    name: '退租申请'
                },
                {
                    icon: 'http://58.240.238.158:8100/images/service/icons-basic/icon31.png',
                    name: '快讯通知'
                }
            ]
        }
    },
    onLoad() {
        uni.setNavigationBarTitle({
            title: '不显示标题'
        })
    },
    methods: {
        handleTapItem(e) {
            console.log(e);
        }
    }
}
API
Props
| 属性名 | 类型 | 默认值 | 说明 | 
| timestamp | Number | null | 时间戳 | 
| dataList | Array | - | 数据,期望格式:list:[{icon: '', name: ''}, ...] | 
| showLine | Boolean | true | 是否显示标题左侧的竖块 | 
| lineStyle | Object | {width: '10rpx',height: '32rpx',backgroundColor: '#D4E5EF',borderRadius: '6rpx',marginRight: '20rpx' } | 标题左侧的竖块样式 | 
| lineInsertStyle | Object | {width: '10rpx',height: '32rpx',backgroundColor: '#354E6B',borderRadius: '6rpx',marginRight: '20rpx' } | 标题嵌入时左侧的竖块样式 | 
| titleType | String | normal | 标题类型,可选项 insert(嵌入) | 
| titleSize | String | 32rpx | 标题文字大小 | 
| titleFontWeight | Number | 700 | 标题粗细 | 
| titleColor | String | #D4E5EF | 标题颜色 | 
| titleInsertColor | String | #354E6B | 嵌入时,标题颜色 | 
| width | Number | 690 | 组件宽度,以750为基准,减去当前页面的外边距后得出,用于按钮列数计算按钮的宽度 | 
| bgColor | String | #D4E5EF | 组件背景色 | 
| color | String | #354E6B | 组件字体颜色 | 
| radius | String | 20rpx | 组件圆角 | 
| paddingTop | Number | 30 | 组件上内边距, 下内边距同上 | 
| showTitle | Boolean | true | 是否显示标题 | 
| colNum | Number | 4 | 按钮显示的列数,推荐3~5列 | 
| scale | Number | 0.6 | 按钮图标缩放比列,可填范围0~1,根据列数适当调整该参数,使图标显示最佳效果 | 
Events
| 事件名 | 说明 | 返回值 | 
| tapItem | 点击事件 | 点击按钮,返回整个对象 |