index.less 6.9 KB

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