|
- // components/feedbackInfo/index.js
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- dataSource:{
- type:Object,
- value:{},
- },
- type: {
- type: String,
- value: 'todo'
- }
- },
-
- /**
- * 组件的初始数据
- */
- data: {
- infoList: [
- {key: 'streamName', label:"问题河道:", limit: 10},
- {key: 'feedbackDesc', label:"问题描述:", limit: 10},
- {key: 'createTime', label:"反馈时间:", limit:25}
- ],
- dataItem: {}
- },
- observers: {
- 'dataSource'(dataSource) {
- let dataItem = this.data.dataItem
- dataItem.streamName = dataSource.streamName
- dataItem.createTime = dataSource.createTime
- dataItem.feedbackDesc = dataSource.feedbackDesc.length > 10 ? (dataSource.feedbackDesc.slice(0, 10) + '...') : dataSource.feedbackDesc
- this.setData({dataItem})
- }
- },
-
- /**
- * 组件的方法列表
- */
- methods: {
- handleData() {
-
- }
- }
- })
|