这是我的 vuejs 文件
<v-col md="6">
<p class="title text-center">Timer: {{count}}s</p>
</v-col>
export default {
data () {
return {
count: null
}
},
created () {
this.count
},
computed: {
downCount () {
this.count = this.$store.getters.countingDown
}
},
}
我无法自动运行,但是当我单击检查元素上的选项卡 vue 时它可以工作
最佳答案
您可以声明一个计算属性count
,如下所示:
<v-col md="6">
<p class="title text-center">Timer: {{count}}s</p>
</v-col>
export default {
data () {
return {
count: null
}
},
created () {
this.count
},
computed: {
count() {
return this.$store.getters.countingDown
}
},
}
希望这有帮助。
关于javascript - VUE JS无法自动运行时间倒计时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58686644/