index.js 891 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. Component({
  2. options: {
  3. addGlobalClass: true,
  4. multipleSlots: true,
  5. },
  6. properties: {
  7. address: {
  8. type: Object,
  9. value: {},
  10. },
  11. customIcon: {
  12. type: String,
  13. value: 'edit-1',
  14. },
  15. extraSpace: {
  16. type: Boolean,
  17. value: true,
  18. },
  19. isDrawLine: {
  20. type: Boolean,
  21. value: true,
  22. },
  23. },
  24. externalClasses: [
  25. 'item-wrapper-class',
  26. 'title-class',
  27. 'default-tag-class',
  28. 'normal-tag-class',
  29. 'address-info-class',
  30. 'delete-class',
  31. ],
  32. methods: {
  33. onDelete(e) {
  34. const { item } = e.currentTarget.dataset;
  35. this.triggerEvent('onDelete', item);
  36. },
  37. onSelect(e) {
  38. const { item } = e.currentTarget.dataset;
  39. this.triggerEvent('onSelect', item);
  40. },
  41. onEdit(e) {
  42. const { item } = e.currentTarget.dataset;
  43. this.triggerEvent('onEdit', item);
  44. },
  45. },
  46. });