index.less 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. @import '../../themes/default.less';
  2. @import '../../mixins.less';
  3. @listPrefixCls: lz-list;
  4. .@{listPrefixCls} {
  5. &-header {
  6. padding: @v-spacing-lg @h-spacing-lg @v-spacing-md @h-spacing-lg;
  7. font-size: @font-size-base;
  8. color: @color-text-caption;
  9. width: 100%;
  10. box-sizing: border-box;
  11. }
  12. &-footer {
  13. padding: @v-spacing-md @h-spacing-lg @v-spacing-lg @h-spacing-lg;
  14. font-size: @font-size-base;
  15. color: @color-text-caption;
  16. }
  17. &-body {
  18. position: relative;
  19. background-color: @fill-base;
  20. .scale-hairline-common();
  21. .hairline('top');
  22. .hairline('bottom');
  23. view:not(:last-child) {
  24. .@{listPrefixCls}-line {
  25. .scale-hairline-common();
  26. .hairline('bottom');
  27. }
  28. }
  29. }
  30. }
  31. .@{listPrefixCls}-item {
  32. position: relative;
  33. display: flex;
  34. padding-left: @h-spacing-lg;
  35. min-height: @list-item-height;
  36. background-color: @fill-base;
  37. vertical-align: middle;
  38. overflow: hidden;
  39. transition: background-color 200ms;
  40. align-items: center;
  41. .@{listPrefixCls}-ripple {
  42. position: absolute;
  43. background: transparent;
  44. display: inline-block;
  45. overflow: hidden;
  46. will-change: box-shadow, transform;
  47. transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1),
  48. background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
  49. color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  50. outline: none;
  51. cursor: pointer;
  52. border-radius: 100%;
  53. transform: scale(0);
  54. &.@{listPrefixCls}-ripple-animate {
  55. background-color: hsla(0, 0%, 62%, 0.2);
  56. animation: ripple 1s linear;
  57. }
  58. }
  59. &.@{listPrefixCls}-item-top {
  60. .@{listPrefixCls}-line {
  61. align-items: flex-start;
  62. .@{listPrefixCls}-arrow {
  63. margin-top: 2 * @hd;
  64. }
  65. }
  66. }
  67. &.@{listPrefixCls}-item-middle {
  68. .@{listPrefixCls}-line {
  69. align-items: center;
  70. }
  71. }
  72. &.@{listPrefixCls}-item-bottom {
  73. .@{listPrefixCls}-line {
  74. align-items: flex-end;
  75. }
  76. }
  77. &.@{listPrefixCls}-item-error {
  78. .@{listPrefixCls}-line {
  79. .@{listPrefixCls}-extra {
  80. color: #f50;
  81. .@{listPrefixCls}-brief {
  82. color: #f50;
  83. }
  84. }
  85. }
  86. }
  87. &.@{listPrefixCls}-item-active {
  88. background-color: @fill-tap;
  89. }
  90. &&-disabled {
  91. .@{listPrefixCls}-line {
  92. .@{listPrefixCls}-content,
  93. .@{listPrefixCls}-extra {
  94. color: @color-text-disabled;
  95. }
  96. }
  97. }
  98. image {
  99. width: @icon-size-md;
  100. height: @icon-size-md;
  101. vertical-align: middle;
  102. }
  103. /* list左图片显示*/
  104. .@{listPrefixCls}-thumb {
  105. &:first-child {
  106. margin-right: @h-spacing-lg;
  107. }
  108. &:last-child {
  109. margin-left: @h-spacing-md;
  110. }
  111. }
  112. .@{listPrefixCls}-line {
  113. position: relative;
  114. display: flex;
  115. flex: 1;
  116. align-self: stretch;
  117. padding-right: @h-spacing-lg;
  118. overflow: hidden;
  119. /* list左侧主内容*/
  120. .@{listPrefixCls}-content {
  121. flex: 1;
  122. color: @color-text-base;
  123. font-size: @font-size-heading;
  124. line-height: @line-height-paragraph;
  125. text-align: left;
  126. .ellipsis();
  127. padding-top: 7 * @hd;
  128. padding-bottom: 7 * @hd;
  129. }
  130. /* list右补充内容*/
  131. .@{listPrefixCls}-extra {
  132. flex-basis: 36%;
  133. color: @color-text-caption;
  134. font-size: @font-size-caption;
  135. line-height: @line-height-paragraph;
  136. text-align: right;
  137. .ellipsis();
  138. justify-content: flex-end;
  139. padding-top: 7 * @hd;
  140. padding-bottom: 7 * @hd;
  141. }
  142. .@{listPrefixCls}-title {
  143. .ellipsis();
  144. }
  145. /* 辅助性文字*/
  146. .@{listPrefixCls}-brief {
  147. color: @color-text-caption;
  148. font-size: @font-size-subhead;
  149. line-height: @line-height-paragraph;
  150. margin-top: @v-spacing-sm;
  151. .ellipsis();
  152. }
  153. /* list右侧箭头*/
  154. .@{listPrefixCls}-arrow {
  155. display: block;
  156. width: @icon-size-xxs;
  157. height: @icon-size-xxs;
  158. margin-left: @h-spacing-md;
  159. background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='26' viewBox='0 0 16 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 0L0 2l11.5 11L0 24l2 2 14-13z' fill='%23C7C7CC' fill-rule='evenodd'/%3E%3C/svg%3E");
  160. background-size: contain;
  161. background-repeat: no-repeat;
  162. background-position: 50% 50%;
  163. visibility: hidden;
  164. &-horizontal {
  165. visibility: visible;
  166. }
  167. &-vertical {
  168. visibility: visible;
  169. transform: rotate(90deg);
  170. }
  171. &-vertical-up {
  172. visibility: visible;
  173. transform: rotate(270deg);
  174. }
  175. }
  176. &-multiple {
  177. padding: 12.5 * @hd @h-spacing-lg 12.5 * @hd 0;
  178. .@{listPrefixCls}-content {
  179. padding-top: 0;
  180. padding-bottom: 0;
  181. }
  182. .@{listPrefixCls}-extra {
  183. padding-top: 0;
  184. padding-bottom: 0;
  185. }
  186. }
  187. &-wrap {
  188. .@{listPrefixCls}-content {
  189. white-space: normal;
  190. }
  191. .@{listPrefixCls}-extra {
  192. white-space: normal;
  193. }
  194. }
  195. }
  196. select {
  197. position: relative;
  198. display: block;
  199. width: 100%;
  200. height: 100%;
  201. padding: 0;
  202. border: 0;
  203. font-size: @font-size-heading;
  204. appearance: none;
  205. background-color: transparent;
  206. }
  207. }
  208. @keyframes ripple {
  209. 100% {
  210. opacity: 0;
  211. transform: scale(2.5);
  212. }
  213. }