common.scss 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. @import './variable.scss';
  2. .pi-bg-success {
  3. background-color: $pi-green;
  4. }
  5. .pi-bg-gray {
  6. background-color: $pi-light-gray;
  7. }
  8. .pi-bg-blue {
  9. background-color: $pi-blue;
  10. }
  11. .pi-bg-red {
  12. background-color: $pi-red;
  13. }
  14. .pi-gray {
  15. color: $pi-gray;
  16. }
  17. .pi-red {
  18. color: $pi-red;
  19. }
  20. .pi-blue {
  21. color: $pi-blue;
  22. }
  23. .pi-link-blue {
  24. color: $pi-blue;
  25. &:hover {
  26. text-decoration: underline;
  27. color: #0056b3;
  28. cursor: pointer;
  29. }
  30. }
  31. .pi-link-red {
  32. color: $pi-red;
  33. &:hover {
  34. text-decoration: underline;
  35. color: #af1d2a;
  36. cursor: pointer;
  37. }
  38. }
  39. .pi-flex {
  40. display: flex;
  41. }
  42. .pi-flex-wrap {
  43. @extend .pi-flex;
  44. flex-wrap: wrap;
  45. }
  46. .pi-flex-row {
  47. @extend .pi-flex;
  48. flex-direction: row;
  49. }
  50. .pi-flex-column {
  51. @extend .pi-flex;
  52. flex-direction: column;
  53. }
  54. .pi-flex-sub {
  55. flex: 1;
  56. }
  57. .pi-flex-twice {
  58. flex: 2;
  59. }
  60. .pi-flex-treble {
  61. flex: 3;
  62. }
  63. .pi-align-start {
  64. @extend .pi-flex;
  65. align-items: flex-start;
  66. }
  67. .pi-align-end {
  68. @extend .pi-flex;
  69. align-items: flex-end;
  70. }
  71. .pi-align-center {
  72. @extend .pi-flex;
  73. align-items: center;
  74. }
  75. .pi-align-stretch {
  76. @extend .pi-flex;
  77. align-items: stretch;
  78. }
  79. .pi-align-baseline {
  80. @extend .pi-flex;
  81. align-items: baseline;
  82. }
  83. .pi-self-start {
  84. @extend .pi-flex;
  85. align-self: flex-start;
  86. }
  87. .pi-self-center {
  88. @extend .pi-flex;
  89. align-self: flex-center;
  90. }
  91. .pi-self-end {
  92. @extend .pi-flex;
  93. align-self: flex-end;
  94. }
  95. .pi-self-stretch {
  96. @extend .pi-flex;
  97. align-self: stretch;
  98. }
  99. .pi-justify-start {
  100. @extend .pi-flex;
  101. justify-content: flex-start;
  102. }
  103. .pi-justify-end {
  104. @extend .pi-flex;
  105. justify-content: flex-end;
  106. }
  107. .pi-justify-center {
  108. @extend .pi-flex;
  109. justify-content: center;
  110. }
  111. .pi-justify-between {
  112. @extend .pi-flex;
  113. justify-content: space-between;
  114. }
  115. .pi-justify-around {
  116. @extend .pi-flex;
  117. justify-content: space-around;
  118. }
  119. .pi-flex-row-center {
  120. @extend .pi-flex-row;
  121. @extend .pi-justify-center;
  122. @extend .pi-align-center;
  123. }
  124. .pi-flex-column-center {
  125. @extend .pi-flex-column;
  126. @extend .pi-justify-center;
  127. @extend .pi-align-center;
  128. }
  129. .pi-width-100P {
  130. width: 100%;
  131. }
  132. .pi-height-100P {
  133. height: 100%;
  134. }
  135. /* 预设常用样式 */
  136. @for $i from 1 through 100 {
  137. /* font-size */
  138. .pi-fz-#{$i} {
  139. font-size: 1px * $i;
  140. }
  141. /* padding */
  142. .pi-pd-#{$i} {
  143. padding: 1px * $i;
  144. }
  145. .pi-pd-top-#{$i} {
  146. padding-top: 1px * $i;
  147. }
  148. .pi-pd-right-#{$i} {
  149. padding-right: 1px * $i;
  150. }
  151. .pi-pd-bottom-#{$i} {
  152. padding-bottom: 1px * $i;
  153. }
  154. .pi-pd-left-#{$i} {
  155. padding-left: 1px * $i;
  156. }
  157. .pi-pd-tb-#{$i} {
  158. padding-top: 1px * $i;
  159. padding-bottom: 1px * $i;
  160. }
  161. .pi-pd-lr-#{$i} {
  162. padding-right: 1px * $i;
  163. padding-left: 1px * $i;
  164. }
  165. /* margin */
  166. .pi-mg-#{$i} {
  167. margin: 1px * $i;
  168. }
  169. .pi-mg-top-#{$i} {
  170. margin-top: 1px * $i;
  171. }
  172. .pi-mg-right-#{$i} {
  173. margin-right: 1px * $i;
  174. }
  175. .pi-mg-bottom-#{$i} {
  176. margin-bottom: 1px * $i;
  177. }
  178. .pi-mg-left-#{$i} {
  179. margin-left: 1px * $i;
  180. }
  181. .pi-mg-tb-#{$i} {
  182. margin-top: 1px * $i;
  183. margin-bottom: 1px * $i;
  184. }
  185. .pi-mg-lr-#{$i} {
  186. margin-right: 1px * $i;
  187. margin-left: 1px * $i;
  188. }
  189. // width & height
  190. .pi-width-#{$i} {
  191. width: 1px * $i;
  192. }
  193. .pi-height-#{$i} {
  194. height: 1px * $i;
  195. }
  196. // radius
  197. .pi-radius-#{$i} {
  198. border-radius: 1px * $i;
  199. }
  200. // line-height
  201. .pi-lh-#{$i} {
  202. line-height: 1px * $i;
  203. }
  204. }
  205. .pi-text-center {
  206. text-align: center;
  207. }
  208. .pi-text-left {
  209. text-align: left;
  210. }
  211. .pi-text-right {
  212. text-align: right;
  213. }
  214. /*************************
  215. 定位
  216. **************************/
  217. .pi-absolute {
  218. position: absolute;
  219. }
  220. .pi-relative {
  221. position: relative;
  222. }
  223. .pi-fixed {
  224. position: fixed;
  225. }
  226. // absolute
  227. .pi-absolute-top {
  228. @extend .pi-absolute;
  229. top: 0;
  230. left: 0;
  231. z-index: 2;
  232. }
  233. .pi-absolute-center {
  234. @extend .pi-absolute;
  235. top: 50%;
  236. left: 50%;
  237. z-index: 2;
  238. transform: translate(-50%, -50%);
  239. }
  240. .pi-absolute-lt {
  241. position: absolute;
  242. top: 0;
  243. left: 0;
  244. z-index: 2;
  245. }
  246. .pi-absolute-rt {
  247. position: absolute;
  248. top: 0;
  249. right: 0;
  250. z-index: 2;
  251. }
  252. .pi-absolute-lb {
  253. position: absolute;
  254. bottom: 0;
  255. left: 0;
  256. z-index: 2;
  257. }
  258. .pi-absolute-rb {
  259. position: absolute;
  260. right: 0;
  261. bottom: 0;
  262. z-index: 2;
  263. }
  264. // 公共头部
  265. .pi-header {
  266. @extend .pi-width-100P;
  267. @extend .pi-relative;
  268. text-align: center;
  269. background: linear-gradient(#ccc, 2%, #ffffff);
  270. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  271. border-bottom: 1px solid #ddd;
  272. .pi-header-left {
  273. @extend .pi-absolute-lt;
  274. left: 100px;
  275. }
  276. .pi-header-left.no-title {
  277. left: 20px;
  278. }
  279. .pi-header-center {
  280. @extend .pi-absolute-center;
  281. }
  282. .pi-header-right {
  283. @extend .pi-absolute-rt;
  284. right: 20px;
  285. }
  286. }
  287. .wrap-contaniner {
  288. display: flex;
  289. flex-direction: column;
  290. width: calc(100vw - 55px - 120px);
  291. .wrap-content {
  292. height: calc(100vh - 34px);
  293. }
  294. }
  295. // .content-wrap.hide {
  296. // width: calc(100vw - 55px);
  297. // }
  298. // 按钮
  299. .pi-btn-secondary {
  300. color: #fff;
  301. background-color: #6c757d;
  302. border-color: #6c757d;
  303. }
  304. .pi-circle-gray {
  305. position: relative;
  306. padding-left: 14px;
  307. &::before {
  308. content: '';
  309. position: absolute;
  310. top: 50%;
  311. transform: translateY(-50%);
  312. left: 0;
  313. width: 12px;
  314. height: 12px;
  315. background-color: #6c757d;
  316. border-radius: 50%;
  317. }
  318. }
  319. .pi-circle-yellow {
  320. position: relative;
  321. padding-left: 14px;
  322. &::before {
  323. content: '';
  324. position: absolute;
  325. top: 0;
  326. top: 50%;
  327. transform: translateY(-50%);
  328. left: 0;
  329. width: 12px;
  330. height: 12px;
  331. background-color: $pi-yellow;
  332. border-radius: 50%;
  333. }
  334. }
  335. .pi-circle-green {
  336. position: relative;
  337. padding-left: 14px;
  338. &::before {
  339. content: '';
  340. position: absolute;
  341. top: 0;
  342. left: 0;
  343. top: 50%;
  344. transform: translateY(-50%);
  345. width: 12px;
  346. height: 12px;
  347. background-color: $pi-green;
  348. border-radius: 50%;
  349. }
  350. }
  351. .pi-pointer {
  352. cursor: pointer;
  353. }
  354. .m-3 {
  355. margin: 1rem;
  356. }
  357. .mt-3,
  358. .my-3 {
  359. margin-top: 1rem;
  360. }
  361. .pi-table {
  362. width: 100%;
  363. margin-bottom: 1rem;
  364. color: #212529;
  365. & > thead th {
  366. vertical-align: bottom;
  367. border-bottom: 2px solid #dee2e6;
  368. }
  369. & > tbody td,
  370. & > thead td,
  371. & > tbody th,
  372. & > thead th {
  373. padding: 0.3rem;
  374. vertical-align: top;
  375. }
  376. & > tbody th,
  377. & > thead th {
  378. background: #e9ecef;
  379. font-weight: normal;
  380. color: #000;
  381. }
  382. }
  383. .pi-bordered {
  384. border: 1px solid #dee2e6;
  385. & > tbody td,
  386. & > thead td,
  387. & > tbody th,
  388. & > thead th {
  389. border: 1px solid #dee2e6;
  390. }
  391. & > thead th {
  392. border-bottom-width: 2px;
  393. }
  394. }