29 changed files with 84 additions and 202 deletions
@ -1,8 +1,13 @@ |
|||||
<!--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 {{_readed ? 'cell_title_readed':''}}">{{title}}</view> |
<view class="cell-left"> |
||||
<view class="cell_info"> |
<view class="cell_title {{_readed ? 'cell_title_readed':''}}">{{title}}</view> |
||||
<view class="cell_info_meta">{{time}}</view> |
<view class="cell_info"> |
||||
<image wx:if="{{showTop}}" class="cell_info_top" src="images/top.png"></image> |
<view class="cell_info_meta">{{time}}</view> |
||||
|
<image wx:if="{{showTop}}" class="cell_info_top" src="images/top.png"></image> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="cell-right" wx:if="{{image.length > 0}}"> |
||||
|
<image src="{{image}}" class="cell-image"/> |
||||
</view> |
</view> |
||||
</view> |
</view> |
||||
|
@ -1,36 +0,0 @@ |
|||||
// pages/topics/common/interactive/common/imageCell/index.js
|
|
||||
Component({ |
|
||||
/** |
|
||||
* 组件的属性列表 |
|
||||
*/ |
|
||||
properties: { |
|
||||
articleId: String, |
|
||||
title: String, |
|
||||
articleImg: String, |
|
||||
userName: String, |
|
||||
time: String, |
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 组件的初始数据 |
|
||||
*/ |
|
||||
data: { |
|
||||
|
|
||||
}, |
|
||||
|
|
||||
/** |
|
||||
* 组件的方法列表 |
|
||||
*/ |
|
||||
methods: { |
|
||||
onTap() { |
|
||||
let item = { |
|
||||
articleId: this.properties.articleId, |
|
||||
title: this.properties.title, |
|
||||
articleImg: this.properties.articleImg, |
|
||||
userName: this.properties.userName, |
|
||||
time: this.properties.time, |
|
||||
} |
|
||||
this.triggerEvent('clickListItem', { item: item }) |
|
||||
} |
|
||||
} |
|
||||
}) |
|
@ -1,4 +0,0 @@ |
|||||
{ |
|
||||
"component": true, |
|
||||
"usingComponents": {} |
|
||||
} |
|
@ -1,18 +0,0 @@ |
|||||
<!--pages/topics/common/interactive/common/imageCell/index.wxml--> |
|
||||
<view class="cell" id="cell" bindtap="onTap"> |
|
||||
<view class="left {{articleImg === '' ? 'leftActive' : ''}}"> |
|
||||
<view class="left-top"> |
|
||||
<view class="cell_title">{{title}}</view> |
|
||||
</view> |
|
||||
<view class="left-bottom"> |
|
||||
|
|
||||
<view class="left-bottom-userInfo"> |
|
||||
<view class="userName">{{userName}}</view> |
|
||||
<view class="cell_info_meta">{{time}}</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
</view> |
|
||||
<view class="right" wx:if="{{articleImg.length > 0 && articleImg !== 'null'}}"> |
|
||||
<image class="articleImg" src="{{topicImg}}"></image> |
|
||||
</view> |
|
||||
</view> |
|
@ -1,106 +0,0 @@ |
|||||
/* pages/topics/common/interactive/common/imageCell/index.wxss */ |
|
||||
.cell { |
|
||||
|
|
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
padding: 10px 20px; |
|
||||
box-sizing: border-box; |
|
||||
align-items: center; |
|
||||
position: relative; |
|
||||
} |
|
||||
.cell:after { |
|
||||
content: ""; |
|
||||
position: absolute; |
|
||||
bottom: 1px; |
|
||||
left: 20px; |
|
||||
right: 20px; |
|
||||
border-bottom: 1px solid #E7E7E7; |
|
||||
} |
|
||||
.left{ |
|
||||
display: flex; |
|
||||
flex-direction: column; |
|
||||
width: 70%; |
|
||||
} |
|
||||
.leftActive{ |
|
||||
display: flex; |
|
||||
flex-direction: column; |
|
||||
width: 100%; |
|
||||
} |
|
||||
.left-bottom{ |
|
||||
display: flex; |
|
||||
flex: row; |
|
||||
justify-content: space-between; |
|
||||
} |
|
||||
.left-bottom-userInfo{ |
|
||||
display: flex; |
|
||||
flex: row; |
|
||||
align-items: center; |
|
||||
} |
|
||||
.user-icon{ |
|
||||
width: 20px; |
|
||||
height: 20px; |
|
||||
border-radius: 50%; |
|
||||
background-color: #EEEEEE; |
|
||||
} |
|
||||
.userName{ |
|
||||
margin: 0 5px 0 0; |
|
||||
font-size: 12px; |
|
||||
color: #3B3B3B; |
|
||||
} |
|
||||
.left-bottom-comments{ |
|
||||
display: flex; |
|
||||
flex: row; |
|
||||
align-items: center; |
|
||||
margin-right: 10px; |
|
||||
} |
|
||||
.comments-icon{ |
|
||||
width: 15px; |
|
||||
height: 12px; |
|
||||
line-height: 10px; |
|
||||
margin-right: 5px; |
|
||||
} |
|
||||
.image_icon { |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
} |
|
||||
.commentNum{ |
|
||||
font-size: 12px; |
|
||||
color: #3B3B3B; |
|
||||
} |
|
||||
.right{ |
|
||||
width: 30%; |
|
||||
height: 70px; |
|
||||
border-radius: 5px; |
|
||||
background-color: #EEEEEE; |
|
||||
} |
|
||||
image{ |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
} |
|
||||
.articleImg{ |
|
||||
width: 100%; |
|
||||
height: 100%; |
|
||||
border-radius: 5px; |
|
||||
} |
|
||||
.cell_title { |
|
||||
font-weight: 300; |
|
||||
font-size: 17px; |
|
||||
color: #000; |
|
||||
} |
|
||||
.cell_title_selected { |
|
||||
color: #9C9C9C; |
|
||||
} |
|
||||
.cell_info_meta { |
|
||||
padding-top: 10rpx; |
|
||||
display: flex; |
|
||||
flex-direction: row; |
|
||||
align-items: center; |
|
||||
font-size: 12px; |
|
||||
line-height: 12px; |
|
||||
color: #D4D4D4; |
|
||||
} |
|
||||
.cell_info_top { |
|
||||
padding: 0 10px; |
|
||||
width: 20px; |
|
||||
height: 12px; |
|
||||
} |
|
@ -1,6 +1,7 @@ |
|||||
{ |
{ |
||||
"component": true, |
"component": true, |
||||
"usingComponents": { |
"usingComponents": { |
||||
|
"e-empty": "/components/empty/index", |
||||
"cell": "./cell/index" |
"cell": "./cell/index" |
||||
} |
} |
||||
} |
} |
Loading…
Reference in new issue