index.module.less 5.8 KB

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