index.js 340 B

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