uni-stat-breadcrumb.vue 609 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <view class="uni-breadcrumb-x">
  3. <uni-breadcrumb separator="/">
  4. <uni-breadcrumb-item v-for="(route, index) in routes" :key="index" :to="route.to && route.to.path||''">{{route.name}}</uni-breadcrumb-item>
  5. </uni-breadcrumb>
  6. </view>
  7. </template>
  8. <script>
  9. import {
  10. mapState
  11. } from 'vuex'
  12. export default {
  13. name: "uni-stat-breadcrumb",
  14. data() {
  15. return {
  16. };
  17. },
  18. computed: {
  19. ...mapState('app', ['routes'])
  20. }
  21. }
  22. </script>
  23. <style>
  24. .uni-breadcrumb-x {
  25. flex: 1;
  26. display: flex;
  27. padding: 0 5px;
  28. min-height: 55px;
  29. line-height: 55px;
  30. align-items: center;
  31. }
  32. </style>