Skip to content

Commit

Permalink
update the post page
Browse files Browse the repository at this point in the history
1.fix the showing of the current tag item
2.add delete icon to remove the current tag
  • Loading branch information
Cha0s0000 committed Apr 25, 2018
1 parent 8f42986 commit 3552a6e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
Binary file added images/icon/close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion pages/post/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,11 @@ Page({
wx.navigateTo({
url: '../profile/profile?account=' + account
})
}
},

deleteTag: function (e) {
app.globalData.tag = '';
this.onLoad();
},
})

5 changes: 4 additions & 1 deletion pages/post/post.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

</block>
</scroll-view>
<view class="currentTag">{{currentTag}}</view>
<view class="currentTag">
<text class="tagText">{{currentTag}}</text>
<image hidden= "{{currentTag == 'All'? true : false}}" bindtap='deleteTag' class="deleteTag" src="../../images/icon/close.png"></image>
</view>
<image bindtap='searchTags' class="searchIcon" src="../../images/icon/search.png"></image>
</view>
<view class="content {{open ? 'page-move' : ''}}">
Expand Down
19 changes: 16 additions & 3 deletions pages/post/post.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ swiper,swiper image {
.currentTag{
position: absolute;
left:350rpx;
display:block;
display:flex;
text-align: center;
margin-left: 20px;
margin-left: 10px;
margin-right: 20px;
border-width: medium;
border-style: solid;
Expand All @@ -269,7 +269,20 @@ swiper,swiper image {
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
justify-content:center;

align-items: center;
}

.tagText{
font-size: 1.7ch;
font-weight:600;
margin-left: 10rpx;
margin-right: 10rpx;
}

.deleteTag{
margin-right:10rpx;
width: 30rpx;
height: 30rpx;
}

.drawer_screen {
Expand Down

0 comments on commit 3552a6e

Please sign in to comment.