tab-bar-item.wxss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. .t-float-left {
  2. float: left;
  3. }
  4. .t-float-right {
  5. float: right;
  6. }
  7. @keyframes tdesign-fade-out {
  8. from {
  9. opacity: 1;
  10. }
  11. to {
  12. opacity: 0;
  13. }
  14. }
  15. .hotspot-expanded.relative {
  16. position: relative;
  17. }
  18. .hotspot-expanded::after {
  19. content: '';
  20. display: block;
  21. position: absolute;
  22. left: 0;
  23. top: 0;
  24. right: 0;
  25. bottom: 0;
  26. transform: scale(1.5);
  27. }
  28. :host {
  29. flex: 1;
  30. }
  31. .t-tab-bar-item {
  32. height: var(--td-tab-bar-height, 80rpx);
  33. box-sizing: border-box;
  34. user-select: none;
  35. position: relative;
  36. margin: 16rpx 0;
  37. background-color: var(--td-tab-bar-bg-color, var(--td-bg-color-block, #fff));
  38. padding: 0 24rpx;
  39. }
  40. .t-tab-bar-item--text-only {
  41. font-size: 32rpx;
  42. }
  43. .t-tab-bar-item--split:before {
  44. position: absolute;
  45. box-sizing: border-box;
  46. content: ' ';
  47. pointer-events: none;
  48. top: 0;
  49. bottom: 0;
  50. left: 0;
  51. border-left: 1px solid var(--td-tab-bar-border-color, var(--td-border-level-1-color, #e6e6e6));
  52. transform: scaleX(0.5);
  53. top: 16rpx;
  54. bottom: 16rpx;
  55. }
  56. .t-tab-bar-item--crowded {
  57. padding: 0 16rpx;
  58. }
  59. .t-tab-bar-item--round {
  60. border-radius: 99px;
  61. }
  62. .t-tab-bar-item__content {
  63. width: 100%;
  64. height: 100%;
  65. display: flex;
  66. flex-direction: column;
  67. align-items: center;
  68. justify-content: center;
  69. border-radius: 16rpx;
  70. color: var(--td-tab-bar-color, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
  71. }
  72. .t-tab-bar-item__content--checked {
  73. color: var(--td-tab-bar-active-color, var(--td-primary-color, #0052d9));
  74. font-weight: 600;
  75. }
  76. .t-tab-bar-item__content--tag {
  77. border-radius: 99px;
  78. }
  79. .t-tab-bar-item__content--tag.t-tab-bar-item__content--checked {
  80. background-color: var(--td-tab-bar-active-bg, var(--td-primary-color-1, #ecf2fe));
  81. }
  82. .t-tab-bar-item .t-badge-class {
  83. transform: translate(50%, -10%) !important;
  84. }
  85. .t-tab-bar-item__text {
  86. display: flex;
  87. align-items: center;
  88. }
  89. .t-tab-bar-item__text--small {
  90. font-size: 20rpx;
  91. line-height: 32rpx;
  92. }
  93. .t-tab-bar-item__icon-menu {
  94. margin-right: 8rpx;
  95. }
  96. .t-tab-bar-item__spread {
  97. position: absolute;
  98. top: 0;
  99. left: 7%;
  100. width: 86%;
  101. background-color: var(--td-tab-bar-bg-color, var(--td-bg-color-block, #fff));
  102. transform: translate3d(0, calc(-100% - 32rpx), 0);
  103. z-index: 1;
  104. border-radius: 12rpx;
  105. color: var(--td-tab-bar-color, var(--td-font-gray-1, rgba(0, 0, 0, 0.9)));
  106. box-shadow: var(--td-tab-bar-spread-shadow, var(--td-shadow-3, 0 6px 30px 5px rgba(0, 0, 0, 0.05), 0 16px 24px 2px rgba(0, 0, 0, 0.04), 0 8px 10px -5px rgba(0, 0, 0, 0.08)));
  107. }
  108. .t-tab-bar-item__spread::before {
  109. display: block;
  110. content: '';
  111. position: absolute;
  112. bottom: 0;
  113. left: 50%;
  114. width: 0;
  115. height: 0;
  116. border: 16rpx solid transparent;
  117. border-top: 16rpx solid var(--td-tab-bar-bg-color, var(--td-bg-color-block, #fff));
  118. transform: translate3d(-50%, 32rpx, 0);
  119. }
  120. .t-tab-bar-item__spread-item {
  121. width: 100%;
  122. height: 96rpx;
  123. display: flex;
  124. align-items: center;
  125. justify-content: flex-start;
  126. position: relative;
  127. flex-direction: column;
  128. }
  129. .t-tab-bar-item__spread-item--active {
  130. background-color: var(--td-tab-bar-hover-bg-color, rgba(0, 0, 0, 0.05));
  131. }
  132. .t-tab-bar-item__spread-item-split {
  133. box-sizing: border-box;
  134. content: ' ';
  135. pointer-events: none;
  136. background-color: var(--td-tab-bar-spread-border-color, var(--td-border-color, #e7e7e7));
  137. width: 80%;
  138. height: 1px;
  139. transform: translateY(0.5);
  140. }
  141. .t-tab-bar-item__spread-item-text {
  142. padding-top: 24rpx;
  143. }