VUE JS无法自动减少运行时间

这是我的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
   }
  },}

我无法自动运行,但是当我在inspect元素上单击Tab Vue时,它就起作用了

shuangpingye 回答:VUE JS无法自动减少运行时间

您可以声明一个计算属性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
       }
      },}

希望这会有所帮助。

本文链接:https://www.f2er.com/3169315.html

大家都在问