sidebarItem.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="sidebar-item-container">
  3. <view class="container">
  4. <u-badge
  5. numberType="overflow" max="99"
  6. :value="hint" shape="circle"
  7. :absolute="true" :offset="(!hasPlat(['sanitation']) && !hasPlat(['enterprises']))?[-5,10]:[-24,-7]"
  8. style="z-index: 1000;justify-content: center;overflow: hidden;"
  9. >
  10. </u-badge>
  11. <view class="item-icon">
  12. <image :src="$getImages(`${info.mobileIcon}`)" class="icon-img" />
  13. </view>
  14. <view class="item-label">{{ info.meta.title }}</view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. export default {
  20. props: {
  21. info: {
  22. type: Object,
  23. default: () => {
  24. return {}
  25. }
  26. },
  27. hint: {
  28. type: Number,
  29. default: 0
  30. },
  31. },
  32. data() {
  33. return {
  34. }
  35. },
  36. onLoad() {
  37. },
  38. methods: {
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .sidebar-item-container {
  44. position: relative;
  45. width: 100%;
  46. height: auto;
  47. margin-top: 30rpx;
  48. .container {
  49. position: relative;
  50. width: 144rpx;
  51. height: auto;
  52. display: flex;
  53. flex-flow: column nowrap;
  54. align-items: center;
  55. .item-icon {
  56. .icon-img {
  57. width: 48rpx;
  58. height: 48rpx;
  59. }
  60. }
  61. .item-label {
  62. color: #888;
  63. font-size: 22rpx;
  64. line-height: 32rpx;
  65. }
  66. }
  67. }
  68. </style>