Mixin.js 551 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. export default {
  2. props: {
  3. activePattern: {
  4. type: Number,
  5. default: 0
  6. },
  7. patternType: {
  8. type: Number,
  9. default: -9999
  10. },
  11. statusBarHeight: {
  12. type: Number,
  13. default: 0
  14. }
  15. },
  16. data() {
  17. return {
  18. initialEntry: true,
  19. };
  20. },
  21. methods: {
  22. },
  23. watch: {
  24. activePattern: {
  25. handler: function(newType, oldType) {
  26. if (this.patternType && this.patternType === newType && this.initialEntry) {
  27. this.initialEntry = false;
  28. setTimeout(() => {
  29. this.init()
  30. }, 100)
  31. }
  32. },
  33. immediate: true
  34. }
  35. }
  36. }