index.js 860 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import ad from '../index/ad'
  2. ad({
  3. data: {
  4. right: [{
  5. text: 'Cancel',
  6. style: 'background-color: #ddd; color: white',
  7. },
  8. {
  9. text: 'Delete',
  10. style: 'background-color: #F4333C; color: white',
  11. }],
  12. left: [{
  13. text: 'Reply',
  14. style: 'background-color: #108ee9; color: white',
  15. },
  16. {
  17. text: 'Cancel',
  18. style: 'background-color: #ddd; color: white',
  19. }],
  20. },
  21. onClick(e) {
  22. console.log('onClick', e.detail)
  23. if (e.detail.data) {
  24. wx.showModal({
  25. title: `The data is ${e.detail.data}`,
  26. showCancel: !1,
  27. })
  28. }
  29. },
  30. onShare() {
  31. console.log('onShare')
  32. },
  33. onCellClick() {
  34. console.log('onCellClick')
  35. },
  36. })