1234567891011121314151617181920212223 |
- // mixins/countdownMixin.js
- var bluetooth = require('@/common/bluetooth.js');
- export default {
- data() {
- return {
- testCountdown: 10, // 倒计时初始值
- };
- },
- methods: {
- startCountdown(t) {
- this.testCountdown=20
- console.log('test-----',t,this.testCountdown);
- },
- },
- created(){
- this.startCountdown(1)
- },
- mounted() {
- this.startCountdown(2)
- },
- beforeDestroy() {
- },
- };
|