score-card.js 437 B

1234567891011121314151617181920
  1. Component({
  2. properties: {
  3. item: Object,
  4. isComplete: {
  5. type: Boolean,
  6. value: false
  7. }
  8. },
  9. data: {},
  10. methods: {
  11. toHandleScore(e) {
  12. this.triggerEvent("score", {item: this.data.item})
  13. },
  14. toClickCard(e) {
  15. if (this.data.isComplete) {
  16. this.triggerEvent("card", {item: this.data.item})
  17. }
  18. }
  19. }
  20. })