index.module.less 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. :global {
  2. .n-card--bordered {
  3. border: 1Px solid rgba(202, 228, 244, 1) !important;
  4. &:hover {
  5. border: 1Px solid rgba(0, 122, 254, 1) !important;
  6. }
  7. }
  8. }
  9. .card-section-content {
  10. border-radius: 14px;
  11. background: linear-gradient(270deg, #DBF1FF 0%, #E7F9FF 100%) !important;
  12. // :global {
  13. // .n-card-cover {
  14. // border-radius: 14px !important;
  15. // }
  16. // }
  17. // 图片禁止拖动
  18. img {
  19. -moz-user-select: none;
  20. /* 火狐浏览器 */
  21. -webkit-user-drag: none;
  22. /* 谷歌、Safari和Opera浏览器 */
  23. -webkit-user-select: none;
  24. /* 谷歌、Safari和Opera浏览器 */
  25. -ms-user-select: none;
  26. /* IE10+浏览器 */
  27. user-select: none;
  28. /* 通用 */
  29. -webkit-touch-callout: none;
  30. /* iOS Safari */
  31. }
  32. &.isActive {
  33. border: 2px solid rgba(0, 122, 254, 1) !important;
  34. }
  35. }
  36. .card-section {
  37. position: relative;
  38. box-sizing: border-box;
  39. width: 300px;
  40. height: 220px;
  41. border-radius: 14px;
  42. background: linear-gradient(270deg, #DBF1FF 0%, #E7F9FF 100%) !important;
  43. display: inline-flex;
  44. transition: all .3s ease-in-out;
  45. &.cardDrag {
  46. cursor: move;
  47. :global {
  48. .n-image:not(.n-image--preview-disabled) {
  49. cursor: move !important;
  50. }
  51. }
  52. }
  53. &.course {
  54. cursor: pointer;
  55. }
  56. // 鼠标经过时样式
  57. &:hover,
  58. &.showAddBtn {
  59. transform: scale(1.01);
  60. transition: all .3s ease-in-out;
  61. .addBtn {
  62. display: block;
  63. opacity: 1;
  64. transition: all .3s ease-in-out;
  65. }
  66. }
  67. // 封面样式
  68. .cover {
  69. width: 100%;
  70. height: 100%;
  71. background-color: #fff;
  72. border-radius: 14px 14px 0 0;
  73. overflow: hidden;
  74. img {
  75. height: fit-content;
  76. min-height: 100%;
  77. }
  78. }
  79. :global {
  80. .n-card__footer {
  81. padding: 10px 12px;
  82. }
  83. .n-card-cover {
  84. // height: 170px;
  85. position: relative;
  86. flex: 1 auto;
  87. }
  88. }
  89. .audioPlayTypeSection {
  90. position: absolute;
  91. bottom: 10px;
  92. right: 12px;
  93. font-size: 0;
  94. gap: 8px 10px !important;
  95. &.audioPlayTypeSmall {
  96. .iconType {
  97. display: inline-block;
  98. width: 22px;
  99. height: 22px;
  100. }
  101. }
  102. .iconType {
  103. display: inline-block;
  104. width: 26px;
  105. height: 26px;
  106. }
  107. .iconPlay {
  108. background: url('../../common/images/icon-play-default.png');
  109. background-size: contain;
  110. &:hover {
  111. background: url('../../common/images/icon-play-active.png');
  112. background-size: contain;
  113. }
  114. }
  115. .iconSing {
  116. background: url('../../common/images/icon-sing-default.png');
  117. background-size: contain;
  118. &:hover {
  119. background: url('../../common/images/icon-sing-active.png');
  120. background-size: contain;
  121. }
  122. }
  123. }
  124. .footer {
  125. display: flex;
  126. align-items: center;
  127. justify-content: space-between;
  128. // padding: 3px 0;
  129. }
  130. .title {
  131. display: flex;
  132. align-items: center;
  133. .titleType {
  134. width: 13Px;
  135. height: 13Px;
  136. margin-top: 1px;
  137. }
  138. .titleContent {
  139. padding-left: 6px;
  140. font-size: max(16px, 12Px);
  141. max-width: 160px;
  142. color: #131415;
  143. font-weight: 600 !important;
  144. flex: 1;
  145. }
  146. }
  147. // 收藏按钮
  148. .btnGroup {
  149. position: absolute;
  150. right: 12px;
  151. display: flex;
  152. align-items: center;
  153. :global {
  154. .n-spin-content {
  155. display: flex;
  156. align-items: center;
  157. }
  158. }
  159. }
  160. .btnItem+.btnItem {
  161. margin-left: 12px;
  162. }
  163. .iconCollect {
  164. width: 34px;
  165. height: 34px;
  166. // background: url('../../common/images/icon-collect-default.png') no-repeat center;
  167. // background-size: contain;
  168. // position: absolute;
  169. // right: 0;
  170. transition: transform .2s ease;
  171. &:hover {
  172. transform: scale(1.1);
  173. transition: transform .2s ease;
  174. }
  175. &.isCollect {
  176. cursor: pointer;
  177. }
  178. }
  179. .iconDiv {
  180. right: 12px;
  181. }
  182. // 精选
  183. .iconSelected {
  184. background: url('../../common/images/icon-selected.png') no-repeat center;
  185. background-size: contain;
  186. position: absolute;
  187. top: 0px;
  188. left: 0px;
  189. z-index: 9;
  190. width: 58px;
  191. height: 29px;
  192. border-top-left-radius: 14px;
  193. }
  194. // 添加
  195. .addBtn {
  196. position: absolute;
  197. top: 6px;
  198. right: 6px;
  199. font-size: max(16px, 12Px);
  200. font-weight: 600 !important;
  201. height: 32px;
  202. border-radius: 8px;
  203. // display: none;
  204. // opacity: 0;
  205. z-index: 99;
  206. transition: all .3s ease-in-out;
  207. &.addBtnDisabled {
  208. background-color: #fff;
  209. color: #999;
  210. font-weight: bold !important;
  211. --n-border: 1px solid #fff !important;
  212. --n-border-hover: 1px solid #fff !important;
  213. --n-border-pressed: 1px solid #fff !important;
  214. --n-border-focus: 1px solid #fff !important;
  215. --n-border-disabled: 1px solid #fff !important;
  216. --n-opacity-disabled: 1 !important;
  217. }
  218. }
  219. .offShelfBg {
  220. position: absolute;
  221. top: 0;
  222. left: 0;
  223. width: 100%;
  224. height: 100%;
  225. border-radius: 14px;
  226. background-color: rgba(0, 0, 0, 0.7);
  227. z-index: 10;
  228. display: flex;
  229. align-items: center;
  230. justify-content: center;
  231. flex-direction: column;
  232. .offShelfTips {
  233. font-size: 22px;
  234. font-weight: 600;
  235. color: #FFFFFF;
  236. line-height: 30px;
  237. padding-bottom: 32px;
  238. }
  239. .offShelfBtn {
  240. height: 44px;
  241. border-radius: 10px;
  242. min-width: 124px;
  243. }
  244. }
  245. }