LoadingBar 类

1) 案例

import VueRouter from 'vue-router'
import LoadingBar from 'vue-human/utils/LoadingBar'

const loadingBar = new LoadingBar()

router.beforeEach((to, from, next) => {
  // 完成 70
  loadingBar.finish(70)
  next()
})

router.afterEach(route => {
  // 全部完成
  loadingBar.finish()
})

results matching ""

    No results matching ""