Commit f8d7e26c by liimin

style(order): 优化订单组件样式和精简代码

移除不必要的height属性和margin-right
统一OrderCard的padding设置
删除Bottom组件中未使用的onRendered方法
1 parent 765cac21
...@@ -21,13 +21,6 @@ Component({ ...@@ -21,13 +21,6 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
onRendered(e) {
if (e.detail.length) {
this.setData({
marginBottom: "30rpx",
});
}
},
// compute(item) { // compute(item) {
// let { applyQty, sellQty, redeemPoints, freightAmount = 0 } = item; // let { applyQty, sellQty, redeemPoints, freightAmount = 0 } = item;
// const total = sellQty || applyQty || 0; // const total = sellQty || applyQty || 0;
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
共{{item.___qty}}件,实付款 共{{item.___qty}}件,实付款
<text class="price">{{item.___totalPrice||'--'}}积分</text> <text class="price">{{item.___totalPrice||'--'}}积分</text>
</view> </view>
<order-action-buttons order="{{item}}" bindonRendered="onRendered" /> <order-action-buttons order="{{item}}"/>
</view> </view>
\ No newline at end of file \ No newline at end of file
.bottom { .bottom {
margin-top: 36rpx; margin-top: 36rpx;
height: 60rpx;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
font-size: 24rpx; font-size: 24rpx;
color: #656566; color: #656566;
justify-content: space-between; justify-content: space-between;
margin-right: 16rpx;
} }
.bottom .total { .bottom .total {
......
.item { .item {
position: relative; position: relative;
padding: 0 24rpx; padding: 24rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #fff; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
......
.top { .top {
height: 82rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!