Skip to content

Commit

Permalink
fix: pie won't display after adding the first goal
Browse files Browse the repository at this point in the history
  • Loading branch information
gwokhov committed Jun 1, 2019
1 parent 3c84522 commit e84cbe7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miniprogram/pages/home/index.wxml
Expand Up @@ -13,8 +13,8 @@
</view>
<!-- 饼状图 -->
<view class="pie-container">
<image class="empty-img" wx:if="{{goalList.length === 0}}" mode="aspectFit" src="../../images/home/empty.png" bind:tap="onCreateGoal" />
<view class="pie" hidden="{{creatingGoal || goalList.length === 0}}">
<image class="empty-img" wx:if="{{goalList.length === 0 || !goalList}}" mode="aspectFit" src="../../images/home/empty.png" bind:tap="onCreateGoal" />
<view class="pie" hidden="{{creatingGoal}}">
<ec-canvas id="chart" ec="{{ chart }}"></ec-canvas>
</view>
</view>
Expand Down
2 changes: 2 additions & 0 deletions miniprogram/pages/home/index.wxss
Expand Up @@ -55,9 +55,11 @@
display: flex;
justify-content: center;
align-items: center;
position: relative;
}

.empty-img {
position: absolute;
width: 50%;
}

Expand Down

0 comments on commit e84cbe7

Please sign in to comment.