拓恒河湖长制全民护河平台WEB端
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.

47 lines
1.1KB

  1. // components/feedbackInfo/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. dataSource:{
  8. type:Object,
  9. value:{},
  10. },
  11. type: {
  12. type: String,
  13. value: 'todo'
  14. }
  15. },
  16. /**
  17. * 组件的初始数据
  18. */
  19. data: {
  20. infoList: [
  21. {key: 'streamName', label:"问题河道:", limit: 10},
  22. {key: 'feedbackDesc', label:"问题描述:", limit: 10},
  23. {key: 'createTime', label:"反馈时间:", limit:25}
  24. ],
  25. dataItem: {}
  26. },
  27. observers: {
  28. 'dataSource'(dataSource) {
  29. let dataItem = this.data.dataItem
  30. dataItem.streamName = dataSource.streamName
  31. dataItem.createTime = dataSource.createTime
  32. dataItem.feedbackDesc = dataSource.feedbackDesc.length > 10 ? (dataSource.feedbackDesc.slice(0, 10) + '...') : dataSource.feedbackDesc
  33. this.setData({dataItem})
  34. }
  35. },
  36. /**
  37. * 组件的方法列表
  38. */
  39. methods: {
  40. handleData() {
  41. }
  42. }
  43. })