微信小程序实现横向增长表格的方法
效果图如下所示:
下面给大家分享微信小程序横向增长表格的实例代码,代码如下所示:
<view class='table'> <view class='tr'> <view class='td' wx:for='{{array}}'>{{item.day}}</view> </view> <view class='tr'> <view class='td' wx:for='{{array}}'>{{item.number}}</view> </view> </view>
.table { font-size: 24rpx; margin-top: 50rpx; border: 1rpx solid #dadada; } .tr { width: 100%; display: flex; justify-content: space-between; } .td { padding: 10rpx; border-bottom: 1rpx solid #dadada; border-right: 1rpx solid #dadada; text-align: center; width: 100%; }
Page({ /** * 页面的初始数据 */ data: { array: [{ day: '7-24', number: 4 }, { day: '7-23', number: 32 }, { day: '7-22', number: 32 }, { day: '7-21', number: 25 }, { day: '7-20', number: 32 }, { day: '7-19', number: 33 }, { day: '7-18', number: 33 }] },
总结
相关推荐
kgshuo 2020-09-25
Tomato 2020-09-10
taiyangyu 2020-09-10
CodeAndroid 2020-09-10
small 2020-07-29
sucheng 2020-07-26
zuoliangzhu 2020-07-20
CodeAndroid 2020-07-14
xiaoxubbs 2020-07-04
sucheng 2020-06-25
kgshuo 2020-06-14
意外金喜 2020-06-14
zuoliangzhu 2020-06-14
tianping 2020-06-14
hgzhang 2020-06-14
killgod 2020-06-14
戴翔的技术 2020-06-14
郴州小程序 2020-06-13