index.js 383 B

123456789101112131415161718192021222324
  1. Component({
  2. properties: {
  3. list: {
  4. type: Array
  5. },
  6. callback: {
  7. type: Function
  8. }
  9. },
  10. options: {
  11. addGlobalClass: true
  12. },
  13. methods: {
  14. toDetail(e) {
  15. const {
  16. id
  17. } = e.currentTarget.dataset;
  18. this.triggerEvent('callback', id)
  19. wx.navigateTo({
  20. url: '/pages/index/message/detail?id=' + id,
  21. })
  22. }
  23. }
  24. })