【问题标题】:Step bar load with animation带动画的步进栏加载
【发布时间】:2020-07-03 11:51:01
【问题描述】:

这是我来自 Vue 引导组件的进度条,您可以在数据中设置默认数字,值为:数字,我希望它在我转到下一页时自动增加。任何人都可以帮助我吗?我尝试了 props,但我不知道该怎么做。

   b-progress(:value='value', :max='max', show-progress='', animated='')
   b-button.next.mt-3.pb-1(v-if="nextLink" :to="{name: nextLink}")
   RegistrationNav(prev-link="registration_goal" next-link="registration_interview")

【问题讨论】:

  • 你可以通过设置全局进度值来使用 vuex 实现这一点

标签: vue.js bootstrap-4 vuejs2 pug


【解决方案1】:

举个基本的例子,不使用 vue 让我们这样想象:

您有一个父组件,其中包括 b-progress 和其他一些组件或用户的输入输出:

  <template>
   <div>
       <b-progress :value="currentValue"><b-progress/>

       <button @click="currentValue++">Click to increment </button>
   </div>
  </template>

    export default {
    name: "Login.vue",

    data() {
        return {
            currentValue: 1
               }
         }
    }

【讨论】:

    猜你喜欢
    • 2021-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多