bar.wxss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. /* ==================
  2. 操作条
  3. ==================== */
  4. .bar {
  5. display: flex;
  6. position: relative;
  7. align-items: center;
  8. min-height: 100rpx;
  9. justify-content: space-between;
  10. }
  11. .bar .action {
  12. display: flex;
  13. align-items: center;
  14. height: 100%;
  15. justify-content: center;
  16. max-width: 100%;
  17. }
  18. .bar .content {
  19. position: absolute;
  20. text-align: center;
  21. width: calc(100% - 340rpx);
  22. left: 0;
  23. right: 0;
  24. bottom: 0;
  25. top: 0;
  26. margin: auto;
  27. height: 60rpx;
  28. font-size: 32rpx;
  29. line-height: 60rpx;
  30. cursor: none;
  31. pointer-events: none;
  32. text-overflow: ellipsis;
  33. white-space: nowrap;
  34. overflow: hidden;
  35. }
  36. .bar.ios .content {
  37. bottom: 7px;
  38. height: 30px;
  39. font-size: 32rpx;
  40. line-height: 30px;
  41. }
  42. .bar .action:first-child {
  43. margin-left: 30rpx;
  44. font-size: 30rpx;
  45. }
  46. .bar .action:first-child>text[class*="icon-"] {
  47. margin-left: -0.3em;
  48. margin-right: 0.3em;
  49. }
  50. .bar .action:last-child {
  51. margin-right: 30rpx;
  52. }
  53. .bar .action>text[class*="icon-"],
  54. .bar .action>view[class*="icon-"] {
  55. font-size: 36rpx;
  56. }
  57. .bar .action>text[class*="icon-"]+text[class*="icon-"] {
  58. margin-left: 0.5em;
  59. }
  60. .bar .content {
  61. position: absolute;
  62. text-align: center;
  63. width: calc(100% - 340rpx);
  64. left: 0;
  65. right: 0;
  66. bottom: 0;
  67. top: 0;
  68. margin: auto;
  69. height: 60rpx;
  70. font-size: 32rpx;
  71. line-height: 60rpx;
  72. cursor: none;
  73. pointer-events: none;
  74. text-overflow: ellipsis;
  75. white-space: nowrap;
  76. overflow: hidden;
  77. }
  78. .bar.ios .content {
  79. bottom: 7px;
  80. height: 30px;
  81. font-size: 32rpx;
  82. line-height: 30px;
  83. }
  84. .bar.btn-group {
  85. justify-content: space-around;
  86. }
  87. .bar.btn-group button {
  88. padding: 20rpx 32rpx;
  89. }
  90. .bar.btn-group button {
  91. flex: 1;
  92. margin: 0 20rpx;
  93. max-width: 50%;
  94. }
  95. .bar .search-form {
  96. background-color: #f5f5f5;
  97. line-height: 64rpx;
  98. height: 64rpx;
  99. font-size: 24rpx;
  100. color: var(--black);
  101. flex: 1;
  102. display: flex;
  103. align-items: center;
  104. margin: 0 30rpx;
  105. }
  106. .bar .search-form+.action {
  107. margin-right: 30rpx;
  108. }
  109. .bar .search-form input {
  110. flex: 1;
  111. padding-right: 30rpx;
  112. height: 64rpx;
  113. line-height: 64rpx;
  114. font-size: 26rpx;
  115. background-color: transparent;
  116. }
  117. .bar .search-form [class*="icon-"] {
  118. margin: 0 0.5em 0 0.8em;
  119. }
  120. .bar .search-form [class*="icon-"]::before {
  121. top: 0rpx;
  122. }
  123. .bar.fixed,
  124. .nav.fixed {
  125. position: fixed;
  126. width: 100%;
  127. top: 0;
  128. z-index: 1024;
  129. box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0.1);
  130. }
  131. .bar.foot {
  132. position: fixed;
  133. width: 100%;
  134. bottom: 0;
  135. z-index: 1024;
  136. box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, 0.1);
  137. }
  138. .bar.tabbar {
  139. padding: 0;
  140. height: calc(100rpx + env(safe-area-inset-bottom) / 2);
  141. padding-bottom: calc(env(safe-area-inset-bottom) / 2);
  142. }
  143. .cu-tabbar-height {
  144. min-height: 100rpx;
  145. height: calc(100rpx + env(safe-area-inset-bottom) / 2);
  146. }
  147. .bar.tabbar.shadow {
  148. box-shadow: 0 -1rpx 6rpx rgba(0, 0, 0, 0.1);
  149. }
  150. .bar.tabbar .action {
  151. font-size: 22rpx;
  152. position: relative;
  153. flex: 1;
  154. text-align: center;
  155. padding: 0;
  156. display: block;
  157. height: auto;
  158. line-height: 1;
  159. margin: 0;
  160. overflow: initial;
  161. }
  162. .bar.tabbar.shop .action {
  163. width: 140rpx;
  164. flex: initial;
  165. }
  166. .bar.tabbar .action.add-action {
  167. position: relative;
  168. z-index: 2;
  169. padding-top: 50rpx;
  170. background-color: inherit;
  171. }
  172. .bar.tabbar .action.add-action [class*="icon-"] {
  173. position: absolute;
  174. width: 70rpx;
  175. z-index: 2;
  176. height: 70rpx;
  177. border-radius: 50%;
  178. line-height: 70rpx;
  179. font-size: 50rpx;
  180. top: -35rpx;
  181. left: 0;
  182. right: 0;
  183. margin: auto;
  184. padding: 0;
  185. }
  186. .bar.tabbar .action.add-action::after {
  187. content: "";
  188. position: absolute;
  189. width: 100rpx;
  190. height: 100rpx;
  191. top: -50rpx;
  192. left: 0;
  193. right: 0;
  194. margin: auto;
  195. box-shadow: 0 -3rpx 8rpx rgba(0, 0, 0, 0.08);
  196. border-radius: 50rpx;
  197. background-color: inherit;
  198. z-index: 0;
  199. }
  200. .bar.tabbar .action.add-action::before {
  201. content: "";
  202. position: absolute;
  203. width: 100rpx;
  204. height: 30rpx;
  205. bottom: 30rpx;
  206. left: 0;
  207. right: 0;
  208. margin: auto;
  209. background-color: inherit;
  210. z-index: 1;
  211. }
  212. .bar.tabbar .btn-group {
  213. flex: 1;
  214. display: flex;
  215. justify-content: space-around;
  216. align-items: center;
  217. padding: 0 10rpx;
  218. }
  219. .bar.tabbar button.action::after {
  220. border: 0;
  221. }
  222. .bar.tabbar .action [class*="icon-"] {
  223. width: 100rpx;
  224. position: relative;
  225. display: block;
  226. height: auto;
  227. margin: 0 auto 10rpx;
  228. text-align: center;
  229. font-size: 40rpx;
  230. }
  231. .bar.tabbar .action .icon-cu-image {
  232. margin: 0 auto;
  233. }
  234. .bar.tabbar .action .icon-cu-image image {
  235. width: 50rpx;
  236. height: 50rpx;
  237. display: inline-block;
  238. }
  239. .bar.tabbar .submit {
  240. align-items: center;
  241. display: flex;
  242. justify-content: center;
  243. text-align: center;
  244. position: relative;
  245. flex: 2;
  246. align-self: stretch;
  247. }
  248. .bar.tabbar .submit:last-child {
  249. flex: 2.6;
  250. }
  251. .bar.tabbar .submit+.submit {
  252. flex: 2;
  253. }
  254. .bar.tabbar.border .action::before {
  255. content: " ";
  256. width: 200%;
  257. height: 200%;
  258. position: absolute;
  259. top: 0;
  260. left: 0;
  261. transform: scale(0.5);
  262. transform-origin: 0 0;
  263. border-right: 1rpx solid rgba(0, 0, 0, 0.1);
  264. z-index: 3;
  265. }
  266. .bar.tabbar.border .action:last-child:before {
  267. display: none;
  268. }
  269. .bar.input {
  270. padding-right: 20rpx;
  271. background-color: var(--white);
  272. }
  273. .bar.input input {
  274. overflow: initial;
  275. line-height: 64rpx;
  276. height: 64rpx;
  277. min-height: 64rpx;
  278. flex: 1;
  279. font-size: 30rpx;
  280. margin: 0 20rpx;
  281. }
  282. .bar.input .action {
  283. margin-left: 20rpx;
  284. }
  285. .bar.input .action [class*="icon-"] {
  286. font-size: 48rpx;
  287. }
  288. .bar.input input+.action {
  289. margin-right: 20rpx;
  290. margin-left: 0rpx;
  291. }
  292. .bar.input .action:first-child [class*="icon-"] {
  293. margin-left: 0rpx;
  294. }