index.js 422 B

1234567891011121314151617181920212223
  1. // mixins/countdownMixin.js
  2. var bluetooth = require('@/common/bluetooth.js');
  3. export default {
  4. data() {
  5. return {
  6. testCountdown: 10, // 倒计时初始值
  7. };
  8. },
  9. methods: {
  10. startCountdown(t) {
  11. this.testCountdown=20
  12. console.log('test-----',t,this.testCountdown);
  13. },
  14. },
  15. created(){
  16. this.startCountdown(1)
  17. },
  18. mounted() {
  19. this.startCountdown(2)
  20. },
  21. beforeDestroy() {
  22. },
  23. };