item.js 369 B

123456789101112131415161718192021
  1. Component({
  2. options: {
  3. addGlobalClass: true
  4. },
  5. properties: {
  6. item: {
  7. type: Object
  8. },
  9. onDelete: {
  10. type: Function
  11. },
  12. isDelete: {
  13. type: Boolean
  14. }
  15. },
  16. methods: {
  17. deleteItem() {
  18. this.triggerEvent("onDelete", this.data.item);
  19. }
  20. }
  21. })