tab-bar-item.wxss 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  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. page {
  29. --td-tab-bar-bg-color: #fff;
  30. --td-tab-bar-hover-color: rgba(0, 0, 0, 0.05);
  31. --td-tab-bar-item-color: rgba(0, 0, 0, 0.6);
  32. --td-tab-bar-item-active-color: #0052d9;
  33. }
  34. :host {
  35. flex: 1;
  36. }
  37. .t-tab-bar-item {
  38. height: 48px;
  39. box-sizing: border-box;
  40. user-select: none;
  41. position: relative;
  42. background-color: var(--td-tab-bar-bg-color, #fff);
  43. }
  44. .t-tab-bar-item--active {
  45. background-color: var(--td-tab-bar-hover-color, rgba(0, 0, 0, 0.05));
  46. }
  47. .t-tab-bar-item.t-is-split:before {
  48. position: absolute;
  49. box-sizing: border-box;
  50. content: ' ';
  51. pointer-events: none;
  52. top: 0;
  53. bottom: 0;
  54. left: 0;
  55. border-left: 1px solid #e6e6e6;
  56. transform: scaleX(0.5);
  57. top: 8px;
  58. bottom: 8px;
  59. }
  60. .t-tab-bar-item__content {
  61. width: 100%;
  62. height: 100%;
  63. display: flex;
  64. flex-direction: column;
  65. align-items: center;
  66. justify-content: center;
  67. color: var(--td-tab-bar-item-color, rgba(0, 0, 0, 0.6));
  68. }
  69. .t-tab-bar-item__content.t-is-checked {
  70. color: var(--td-tab-bar-item-active-color, #0052d9);
  71. }
  72. .t-tab-bar-item__content.t-is-checked .t-tab-bar-item__icon-menu {
  73. background-color: var(--td-tab-bar-item-active-color, #0052d9);
  74. }
  75. .t-tab-bar-item .t-badge-class {
  76. transform: translate(50%, -10%) !important;
  77. }
  78. .t-tab-bar-item__text {
  79. display: flex;
  80. align-items: center;
  81. }
  82. .t-tab-bar-item__text.t-size-s {
  83. font-size: 10px;
  84. line-height: 18px;
  85. }
  86. .t-tab-bar-item__icon {
  87. height: 24px;
  88. }
  89. .t-tab-bar-item__icon-menu {
  90. width: 8px;
  91. height: 1px;
  92. background-color: #666;
  93. position: relative;
  94. margin-right: 4px;
  95. }
  96. .t-tab-bar-item__icon-menu::before,
  97. .t-tab-bar-item__icon-menu::after {
  98. display: block;
  99. content: '';
  100. position: absolute;
  101. left: 0;
  102. background-color: inherit;
  103. width: inherit;
  104. height: inherit;
  105. }
  106. .t-tab-bar-item__icon-menu::before {
  107. top: -4px;
  108. }
  109. .t-tab-bar-item__icon-menu::after {
  110. bottom: -4px;
  111. }
  112. .t-tab-bar-item__spread {
  113. position: absolute;
  114. top: 0;
  115. left: 7%;
  116. width: 86%;
  117. background-color: #fff;
  118. transform: translate3d(0, calc(-100% - 16px), 0);
  119. z-index: 1;
  120. }
  121. .t-tab-bar-item__spread::before {
  122. display: block;
  123. content: '';
  124. position: absolute;
  125. bottom: 0;
  126. left: 50%;
  127. width: 0;
  128. height: 0;
  129. border: 8px solid transparent;
  130. border-top: 8px solid #fff;
  131. transform: translate3d(-50%, 16px, 0);
  132. }
  133. .t-tab-bar-item__spread-item {
  134. width: 100%;
  135. height: 50px;
  136. display: flex;
  137. align-items: center;
  138. justify-content: center;
  139. }
  140. .t-tab-bar-item__spread-item--active {
  141. background-color: rgba(0, 0, 0, 0.05);
  142. }
  143. .t-tab-bar-item__spread-item + .t-tab-bar-item__spread-item {
  144. position: relative;
  145. }
  146. .t-tab-bar-item__spread-item + .t-tab-bar-item__spread-item:before {
  147. position: absolute;
  148. box-sizing: border-box;
  149. content: ' ';
  150. pointer-events: none;
  151. top: 0;
  152. border-top: 1px solid #e6e6e6;
  153. transform: scaleY(0.5);
  154. border-top-width: 1px;
  155. border-top-style: solid;
  156. border-top-color: #e6e6e6;
  157. width: 80%;
  158. }