Skip to content

Commit

Permalink
✨ better align
Browse files Browse the repository at this point in the history
  • Loading branch information
shawjia committed Oct 30, 2018
1 parent 7f43370 commit 69026d8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/app/components/footer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Component({

data: {
version: 'v1.3.1',
version: 'v1.3.2',
},

properties: {
Expand Down
20 changes: 14 additions & 6 deletions src/app/pages/index/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<van-tab title="{{ item.from }}" wx:for="{{ fundList }}" wx:key="from">

<van-panel use-footer-slot footer-class="fund-total">
<van-panel use-footer-slot footer-class="fund-footer">

<view class="fund-item">
<view class="name">基金名称</view>
<view class="latest">近日收益</view>
<view>总收益</view>
<view class="total">总收益</view>
</view>

<view class="fund-item" wx:for="{{ item.list }}" wx:key="add" bindtap="goEdit" data-id="{{ item.fundIndex }}">
Expand All @@ -19,16 +19,24 @@
<view class="{{ item.color }}">{{ item.profit }}</view>
<view class="small">{{ item.percent + '%'}}</view>
</view>
<view>
<view class="total">
<view class="{{ item.totalColor }}">{{ item.totalProfit }}</view>
<view class="small">{{ item.date }}</view>
</view>
</view>


<view slot="footer">
<view class="{{ item.latestProfitColor }}"> 近日: {{ item.latestProfit }} </view>
<view class="{{ item.allProfitColor }}"> 累计: {{ item.allProfit }} </view>

<view>
<text>近日:</text>
<text class="{{ item.latestProfitColor }}">{{ item.latestProfit }}</text>
</view>

<view>
<text>累计:</text>
<text class="{{ item.allProfitColor }}">{{ item.allProfit }}</text>
</view>

</view>

</van-panel>
Expand Down
22 changes: 16 additions & 6 deletions src/app/pages/index/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
flex: 1;
white-space: nowrap;
align-self: center;
text-align: center;
text-align: right;
overflow: hidden;
align-content: center;
}
Expand All @@ -29,10 +29,6 @@
color: #888;
}

.from {
padding-left: 10rpx;
}

.win {
color: #e64340;
}
Expand All @@ -41,6 +37,20 @@
color: #09bb07;
}

.fund-total {
.fund-item .total {
padding-right: 30rpx;
text-align: right;
}

.fund-footer {
width: 100%;
box-sizing: border-box;
text-align: right;
}

.fund-footer .win,
.fund-footer .lose
{
width: 160rpx;
display: inline-block;
}

0 comments on commit 69026d8

Please sign in to comment.