You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
702 B
45 lines
702 B
// components/cell/index.js
|
|
Component({
|
|
/**
|
|
* 组件的属性列表
|
|
*/
|
|
properties: {
|
|
index: Number,
|
|
cId: String,
|
|
title: String,
|
|
readed: {
|
|
type:Boolean,
|
|
value: false,
|
|
},
|
|
time: String,
|
|
showTop: {
|
|
type: Boolean,
|
|
value: false,
|
|
}
|
|
},
|
|
observers: {
|
|
readed (value) {
|
|
this.setData({
|
|
_readed: value
|
|
})
|
|
}
|
|
},
|
|
/**
|
|
* 组件的初始数据
|
|
*/
|
|
data: {
|
|
_readed: false,
|
|
},
|
|
|
|
/**
|
|
* 组件的方法列表
|
|
*/
|
|
methods: {
|
|
onTap () {
|
|
this.setData({
|
|
_readed: true
|
|
})
|
|
this.triggerEvent('clickListItem', { id: this.properties.cId, index: this.properties.index})
|
|
}
|
|
}
|
|
})
|
|
|