frame-animation.js 644 B

12345678910111213141516171819202122232425262728293031323334353637
  1. Component({
  2. properties: {
  3. url: {
  4. type: String,
  5. value: "https://img.bazhuay.com/1585887536024_12",
  6. },
  7. count: {
  8. type: String,
  9. value: 3,
  10. },
  11. width: {
  12. type: String,
  13. value: 360,
  14. },
  15. height: {
  16. type: String,
  17. value: 300,
  18. },
  19. duration: {
  20. type: String,
  21. value: 0.3,
  22. },
  23. playNumber: {
  24. type: String,
  25. value: "infinite",
  26. },
  27. },
  28. data: {},
  29. attached() {
  30. if (this.data.playNumber > 0) {
  31. setTimeout(() => {
  32. this.triggerEvent("end");
  33. }, this.data.playNumber * this.data.duration * 1000);
  34. }
  35. },
  36. methods: {},
  37. });