index.js 532 B

123456789101112131415161718192021222324252627282930313233343536
  1. // components/productCard/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. data:{
  8. value:'',
  9. type:{}
  10. },
  11. changeQty:{
  12. value:false,
  13. type:Boolean
  14. }
  15. },
  16. /**
  17. * 组件的初始数据
  18. */
  19. data: {
  20. },
  21. /**
  22. * 组件的方法列表
  23. */
  24. methods: {
  25. onIconTap (data) {
  26. this.triggerEvent("delete", this.data.data);
  27. },
  28. inputChange (e) {
  29. this.data.data.qty = e.detail.value
  30. this.triggerEvent("input", this.data.data);
  31. }
  32. }
  33. })