index.js 774 B

12345678910111213141516171819202122232425262728293031323334
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. properties: {
  4. list: Array
  5. },
  6. options: {
  7. addGlobalClass: true
  8. },
  9. data: {
  10. },
  11. methods: {
  12. /* 处理删除 */
  13. handleDelete(e) {
  14. const {
  15. item
  16. } = e.currentTarget.dataset;
  17. console.log(item)
  18. wx.showModal({
  19. title: '提示',
  20. content: `是否确认移除${item.name}?`,
  21. complete: ({
  22. confirm
  23. }) => {
  24. if (confirm) {
  25. wx.showToast({
  26. title: '移除成功!',
  27. })
  28. }
  29. }
  30. })
  31. },
  32. }
  33. })