index.js 954 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // components/My_SupplyAndDemandItemBox/index.js
  2. Component({
  3. options: {
  4. addGlobalClass: true,
  5. multipleSlots: true
  6. },
  7. /**
  8. * 组件的属性列表
  9. */
  10. properties: {
  11. title: {
  12. type: String,
  13. value: "标题"
  14. },
  15. time: {
  16. type: String
  17. },
  18. imageList: {
  19. type: Array,
  20. value: ['/static/userImage.png', '/static/changeImg.png', "/static/login/identity.png", '/static/changeImg.png', "/static/login/identity.png"]
  21. }
  22. },
  23. /**
  24. * 组件的初始数据
  25. */
  26. data: {
  27. },
  28. /**
  29. * 组件的方法列表
  30. */
  31. methods: {
  32. /* 预览图片 */
  33. previewImage(e) {
  34. const {
  35. index
  36. } = e.currentTarget.dataset
  37. wx.previewImage({
  38. urls: this.data.imageList,
  39. current:index
  40. })
  41. }
  42. }
  43. })