custom-breadcrumb.vue 824 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="uni-breadcrumb">
  3. <slot />
  4. </view>
  5. </template>
  6. <script>
  7. /**
  8. * Breadcrumb 面包屑导航父组件
  9. * @description 显示当前页面的路径,快速返回之前的任意页面
  10. * @tutorial https://ext.dcloud.net.cn/plugin?id=xxx
  11. * @property {String} separator 分隔符,默认为斜杠'/'
  12. * @property {String} separatorClass 图标分隔符 class
  13. */
  14. export default {
  15. options: {
  16. virtualHost: true
  17. },
  18. props: {
  19. separator: {
  20. type: String,
  21. default: '/'
  22. },
  23. separatorClass: {
  24. type: String,
  25. default: ''
  26. }
  27. },
  28. provide() {
  29. return {
  30. uniBreadcrumb: this
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss">
  36. .uni-breadcrumb {
  37. display: flex;
  38. background: #fff;
  39. height: 88rpx;
  40. padding: 20rpx 32rpx;
  41. position: relative;
  42. z-index: 1001;
  43. }
  44. </style>