index.js 523 B

1234567891011121314151617181920212223242526272829303132333435
  1. Component({
  2. options: {
  3. multipleSlots: true,
  4. },
  5. properties: {
  6. list: Array,
  7. title: {
  8. type: String,
  9. value: '促销说明',
  10. },
  11. show: {
  12. type: Boolean,
  13. },
  14. },
  15. // data: {
  16. // list: [],
  17. // },
  18. methods: {
  19. change(e) {
  20. const { index } = e.currentTarget.dataset;
  21. this.triggerEvent('promotionChange', {
  22. index,
  23. });
  24. },
  25. closePromotionPopup() {
  26. this.triggerEvent('closePromotionPopup', {
  27. show: false,
  28. });
  29. },
  30. },
  31. });