index.less 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. @import '../style/var';
  2. @import '../style/mixins/clearfix';
  3. @import '../style/mixins/hairline';
  4. .van-sku {
  5. &-container {
  6. display: flex;
  7. flex-direction: column;
  8. align-items: stretch;
  9. min-height: 50%;
  10. max-height: 80%;
  11. overflow-y: visible;
  12. font-size: @font-size-md;
  13. background: @white;
  14. }
  15. &-body {
  16. flex: 1 1 auto;
  17. min-height: 44px;
  18. overflow-y: scroll;
  19. -webkit-overflow-scrolling: touch;
  20. &::-webkit-scrollbar {
  21. display: none;
  22. }
  23. }
  24. &-header {
  25. display: flex;
  26. flex-shrink: 0;
  27. margin: 0 @padding-md;
  28. &__img-wrap {
  29. flex-shrink: 0;
  30. width: 96px;
  31. height: 96px;
  32. margin: @padding-sm @padding-sm @padding-sm 0;
  33. overflow: hidden;
  34. border-radius: @border-radius-md;
  35. }
  36. &__goods-info {
  37. display: flex;
  38. flex-direction: column;
  39. justify-content: flex-end;
  40. padding: @padding-sm 20px @padding-sm 0;
  41. }
  42. }
  43. &-header-item {
  44. margin-top: @padding-xs;
  45. color: @gray-6;
  46. font-size: @font-size-sm;
  47. line-height: 16px;
  48. }
  49. &__price-symbol {
  50. font-size: @font-size-lg;
  51. vertical-align: bottom;
  52. }
  53. &__price-num {
  54. font-weight: @font-weight-bold;
  55. font-size: 22px;
  56. vertical-align: bottom;
  57. word-wrap: break-word;
  58. }
  59. &__goods-price {
  60. // for price align
  61. margin-left: -2px;
  62. color: @red;
  63. }
  64. &__price-tag {
  65. position: relative;
  66. display: inline-block;
  67. margin-left: @padding-xs;
  68. padding: 0 5px;
  69. overflow: hidden;
  70. color: @red;
  71. font-size: @font-size-sm;
  72. line-height: 16px;
  73. border-radius: 8px;
  74. &::before {
  75. position: absolute;
  76. top: 0;
  77. left: 0;
  78. width: 100%;
  79. height: 100%;
  80. background: currentColor;
  81. opacity: 0.1;
  82. content: '';
  83. }
  84. }
  85. &-group-container {
  86. padding-top: @padding-sm;
  87. &--hide-soldout {
  88. .van-sku-row__item--disabled {
  89. display: none;
  90. }
  91. }
  92. }
  93. /* sku row */
  94. &-row {
  95. margin: 0 @padding-md @padding-sm;
  96. &:last-child {
  97. margin-bottom: 0;
  98. }
  99. &__item,
  100. &__image-item {
  101. position: relative;
  102. overflow: hidden;
  103. color: @text-color;
  104. border-radius: @border-radius-md;
  105. cursor: pointer;
  106. &::before {
  107. position: absolute;
  108. top: 0;
  109. left: 0;
  110. width: 100%;
  111. height: 100%;
  112. background: @sku-item-background-color;
  113. content: '';
  114. }
  115. &--active {
  116. color: @red;
  117. &::before {
  118. background: currentColor;
  119. opacity: 0.1;
  120. }
  121. }
  122. }
  123. &__item {
  124. display: inline-flex;
  125. align-items: center;
  126. justify-content: center;
  127. min-width: 40px;
  128. margin: 0 @padding-sm @padding-sm 0;
  129. font-size: 13px;
  130. line-height: 16px;
  131. vertical-align: middle;
  132. &-img {
  133. z-index: 1;
  134. width: 24px;
  135. height: 24px;
  136. margin: 4px 0 4px 4px;
  137. object-fit: cover;
  138. border-radius: @border-radius-sm;
  139. }
  140. &-name {
  141. z-index: 1;
  142. padding: @padding-xs;
  143. }
  144. &--disabled {
  145. color: @gray-5;
  146. background: @active-color;
  147. cursor: not-allowed;
  148. .van-sku-row__item-img {
  149. opacity: 0.3;
  150. }
  151. }
  152. }
  153. &__image {
  154. margin-right: 0;
  155. &-item {
  156. display: flex;
  157. flex-direction: column;
  158. width: 110px;
  159. margin: 0 4px 4px 0;
  160. border: 1px solid transparent;
  161. &:last-child {
  162. margin-right: 0;
  163. }
  164. &-img {
  165. width: 100%;
  166. height: 110px;
  167. &-icon {
  168. position: absolute;
  169. top: 0;
  170. right: 0;
  171. z-index: 3;
  172. width: 18px;
  173. height: 18px;
  174. color: #fff;
  175. line-height: 18px;
  176. text-align: center;
  177. background-color: rgba(0, 0, 0, 0.4);
  178. border-bottom-left-radius: @border-radius-md;
  179. }
  180. }
  181. &-name {
  182. position: relative;
  183. display: flex;
  184. align-items: center;
  185. justify-content: center;
  186. box-sizing: border-box;
  187. height: 40px;
  188. padding: @padding-base;
  189. font-size: 12px;
  190. line-height: 16px;
  191. span {
  192. word-wrap: break-word;
  193. }
  194. }
  195. &--active {
  196. border-color: currentColor;
  197. }
  198. &--disabled {
  199. color: @gray-5;
  200. cursor: not-allowed;
  201. &::before {
  202. z-index: 2;
  203. background: @active-color;
  204. opacity: 0.4;
  205. }
  206. }
  207. }
  208. }
  209. &__title {
  210. padding-bottom: @padding-sm;
  211. }
  212. &__title-multiple {
  213. color: @gray-6;
  214. }
  215. &__scroller {
  216. margin: 0 -@padding-md;
  217. overflow-x: scroll;
  218. overflow-y: hidden;
  219. -webkit-overflow-scrolling: touch;
  220. &::-webkit-scrollbar {
  221. display: none;
  222. }
  223. }
  224. &__row {
  225. display: inline-flex;
  226. margin-bottom: 4px;
  227. padding: 0 @padding-md;
  228. }
  229. &__indicator {
  230. width: 40px;
  231. height: 4px;
  232. background: @gray-3;
  233. border-radius: 2px;
  234. &-wrapper {
  235. display: flex;
  236. justify-content: center;
  237. padding-bottom: 16px;
  238. }
  239. &-slider {
  240. width: 50%;
  241. height: 100%;
  242. background-color: @red;
  243. border-radius: 2px;
  244. }
  245. }
  246. }
  247. &-stepper-stock {
  248. padding: @padding-sm @padding-md;
  249. overflow: hidden;
  250. line-height: 30px;
  251. }
  252. &__stepper {
  253. float: right;
  254. padding-left: @padding-base;
  255. &-title {
  256. float: left;
  257. }
  258. &-quota {
  259. float: right;
  260. color: @red;
  261. font-size: @font-size-sm;
  262. }
  263. }
  264. &__stock {
  265. display: inline-block;
  266. margin-right: @padding-xs;
  267. color: @gray-6;
  268. font-size: @font-size-sm;
  269. &-num--highlight {
  270. color: @red;
  271. }
  272. }
  273. &-messages {
  274. padding-bottom: @padding-xl;
  275. &__image-cell {
  276. .van-cell__title {
  277. max-width: @field-label-width;
  278. margin-right: @field-label-margin-right;
  279. color: @field-label-color;
  280. text-align: left;
  281. word-wrap: break-word;
  282. }
  283. .van-cell__value {
  284. overflow: visible;
  285. text-align: left;
  286. }
  287. &-label {
  288. color: @cell-label-color;
  289. font-size: @cell-label-font-size;
  290. line-height: @cell-label-line-height;
  291. }
  292. }
  293. &__cell-block {
  294. position: relative;
  295. &::after {
  296. .hairline-bottom(@cell-border-color, @padding-md, @padding-md);
  297. }
  298. &:last-child::after {
  299. display: none;
  300. }
  301. }
  302. &__extra-message {
  303. margin-top: -2px;
  304. padding: 0 16px 12px;
  305. color: @cell-label-color;
  306. font-size: @cell-label-font-size;
  307. line-height: @cell-label-line-height;
  308. }
  309. }
  310. &-actions {
  311. display: flex;
  312. flex-shrink: 0;
  313. padding: @padding-xs @padding-md;
  314. .van-button {
  315. height: 40px;
  316. font-weight: @font-weight-bold;
  317. font-size: @font-size-md;
  318. border: none;
  319. border-radius: 0;
  320. &:first-of-type {
  321. border-top-left-radius: 20px;
  322. border-bottom-left-radius: 20px;
  323. }
  324. &:last-of-type {
  325. border-top-right-radius: 20px;
  326. border-bottom-right-radius: 20px;
  327. }
  328. &--warning {
  329. background: @gradient-orange;
  330. }
  331. &--danger {
  332. background: @gradient-red;
  333. }
  334. }
  335. }
  336. }