order2.js 470 B

12345678910111213141516171819202122232425262728293031
  1. // compone/order/order.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. orderData:{
  8. type: Object,
  9. value: {},
  10. observer: function (newVal, oldVal) {}
  11. }
  12. },
  13. /**
  14. * 组件的初始数据
  15. */
  16. data: {
  17. OrderData:{}
  18. },
  19. /**
  20. * 组件的方法列表
  21. */
  22. methods: {
  23. // 更新状态
  24. updateStatus() {
  25. let id = this.properties.orderData.id;
  26. this.triggerEvent('update', {id: id})
  27. }
  28. }
  29. })