item.js 603 B

1234567891011121314151617181920212223242526272829
  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. lifetimes: {
  17. attached: function () {
  18. getApp().globalData.Language.getLanguagePackage(this)
  19. this.setData({
  20. siteid: wx.getStorageSync('userMsg').siteid
  21. })
  22. }
  23. },
  24. methods: {
  25. deleteItem() {
  26. this.triggerEvent("onDelete", this.data.item);
  27. }
  28. }
  29. })