Browse Source

给cell添加已读效果

master
lqq 6 years ago
parent
commit
0b2cd420c6
  1. 4
      components/cell/index.js
  2. 2
      components/cell/index.wxml
  3. 2
      components/cell/index.wxss

4
components/cell/index.js

@ -6,6 +6,10 @@ Component({
properties: { properties: {
cId: String, cId: String,
title: String, title: String,
readed: {
type:Boolean,
value: true,
},
time: String, time: String,
showTop: { showTop: {
type: Boolean, type: Boolean,

2
components/cell/index.wxml

@ -1,6 +1,6 @@
<!--components/cell/index.wxml--> <!--components/cell/index.wxml-->
<view class="cell" id="e-cell" bindtap="onTap"> <view class="cell" id="e-cell" bindtap="onTap">
<view class="cell_title">{{title}}</view> <view class="cell_title {{readed ? 'cell_title_readed':''}}">{{title}}</view>
<view class="cell_info"> <view class="cell_info">
<view class="cell_info_meta">{{time}}</view> <view class="cell_info_meta">{{time}}</view>
<image wx:if="{{showTop}}" class="cell_info_top" src="images/top.png"></image> <image wx:if="{{showTop}}" class="cell_info_top" src="images/top.png"></image>

2
components/cell/index.wxss

@ -10,7 +10,7 @@
font-size: 17px; font-size: 17px;
color: #000; color: #000;
} }
.cell_title_selected { .cell_title_readed {
color: #9C9C9C; color: #9C9C9C;
} }
.cell_info { .cell_info {

Loading…
Cancel
Save