Skip to content

Commit

Permalink
fix(docs): add loadingBar to show progress
Browse files Browse the repository at this point in the history
[docs] 文档内部导航跳转会卡一下,体验不好

fix IDuxFE#1538
  • Loading branch information
AFine970 committed Jul 25, 2023
1 parent ab4e4b0 commit 75ca02a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/site/src/components/global/GlobalSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,20 @@
</ul>
</template>

<script setup lang="ts"></script>
<script setup lang="ts">
import { useRouter } from 'vue-router'
import { useLoadingBar } from '@idux/components/loading-bar'
const { start, finish } = useLoadingBar()
const router = useRouter()
router.beforeEach((_to, _from, next) => {
start()
next()
})
router.afterEach(() => {
finish()
})
</script>

<style lang="less">
.floatSetting {
Expand Down

0 comments on commit 75ca02a

Please sign in to comment.