You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1249 lines
19 KiB

4 years ago
  1. div,a,img,span,page,view,navigator,image,text,input,textarea,button,form{
  2. box-sizing: border-box;
  3. }
  4. a{
  5. text-decoration: none;
  6. color: $main;
  7. }
  8. form{
  9. display: block;
  10. width: 100%;
  11. }
  12. image{will-change: transform}
  13. input,textarea,form{
  14. width: 100%;
  15. height: auto;
  16. min-height: 10px;
  17. display: block;
  18. font-size: inherit;
  19. }
  20. button{
  21. color: inherit;
  22. line-height: inherit;
  23. margin: 0;
  24. background-color: transparent;
  25. padding: 0;
  26. -webkit-border-radius: 0;
  27. -moz-border-radius: 0;
  28. border-radius: 0;
  29. &:after{
  30. display: none;
  31. }
  32. }
  33. switch .uni-switch-input{
  34. margin-right: 0;
  35. }
  36. .wx-switch-input,.uni-switch-input{width:42px !important;height:22px !important;}
  37. .wx-switch-input::before,.uni-switch-input::before{width:40px !important;height: 20px !important;}
  38. .wx-switch-input::after,.uni-switch-input::after{width: 20px !important;height: 20px !important;}
  39. /**背景颜色**/
  40. .bg{
  41. background-color: $main;
  42. color: $mainInverse;
  43. }
  44. .gradualBg{
  45. background-image: $mainGradual;
  46. color: $mainGradualInverse ;
  47. }
  48. .grayBg{
  49. background-color: #f7f7f7;
  50. color: #30302f;
  51. }
  52. .whiteBg{
  53. background-color: #fff;
  54. color: #000;
  55. }
  56. .blackBg{
  57. background-color: #000;
  58. color: #fff;
  59. }
  60. .orangeBg{
  61. background-color: $orange;
  62. color: #fff;
  63. }
  64. .redBg{
  65. background-color: $red;
  66. color: #fff;
  67. }
  68. .yellowBg{
  69. background-color: $yellow;
  70. color: #000;
  71. }
  72. .greenBg{
  73. background-color: $green;
  74. color: #fff;
  75. }
  76. .brownBg{
  77. background-color: $brown;
  78. color: #fff;
  79. }
  80. .blueBg{
  81. background-color: $blue;
  82. color: #fff;
  83. }
  84. .purpleBg{
  85. background-color: $purple;
  86. color: #fff;
  87. }
  88. /* 文字颜色 */
  89. .main{
  90. color: $main;
  91. }
  92. .green{
  93. color: $green;
  94. }
  95. .red{
  96. color: $red;
  97. }
  98. .yellow{
  99. color: $yellow;
  100. }
  101. .black{
  102. color: $black;
  103. }
  104. .white{
  105. color: $white;
  106. }
  107. .gray{
  108. color: $gray;
  109. }
  110. .grey{
  111. color: $grey;
  112. }
  113. .orange{
  114. color: $orange;
  115. }
  116. .brown{
  117. color: $brown;
  118. }
  119. .blue{
  120. color: $blue;
  121. }
  122. .purple{
  123. color: $purple;
  124. }
  125. .hoverMain{
  126. &:hover{
  127. color: $main;
  128. }
  129. }
  130. .hoverGreen{
  131. &:hover{
  132. color: $green;
  133. }
  134. }
  135. .hoverRed{
  136. &:hover{
  137. color: $red;
  138. }
  139. }
  140. .hoverBlue{
  141. &:hover{
  142. color: $blue;
  143. }
  144. }
  145. .hoverGray{
  146. &:hover{
  147. color: $gray;
  148. }
  149. }
  150. .hoverWhite{
  151. &:hover{
  152. color: $white;
  153. }
  154. }
  155. .hoverBlack{
  156. &:hover{
  157. color: $black;
  158. }
  159. }
  160. .hoverOrange{
  161. &:hover{
  162. color: $orange;
  163. }
  164. }
  165. .hoverYellow{
  166. &:hover{
  167. color: $yellow;
  168. }
  169. }
  170. .hoverBrown{
  171. &:hover{
  172. color: $brown;
  173. }
  174. }
  175. .hoverPurple{
  176. &:hover{
  177. color: $purple;
  178. }
  179. }
  180. /* 宽度 高度 */
  181. $w:0;
  182. @while $w <= 500 {
  183. @if $w <= 100 {
  184. .w#{$w}p{
  185. width: $w*1%;
  186. }
  187. .h#{$w}p{
  188. height: $w*1%;
  189. }
  190. @if $w == 100 {
  191. .100p{
  192. width: 100%;
  193. height: 100%;
  194. }
  195. .ww{
  196. width: 100vw;
  197. }
  198. .hh{
  199. height: 100vh;
  200. }
  201. }
  202. }
  203. .w#{$w}{
  204. width: $w*2upx;
  205. }
  206. .h#{$w}{
  207. height: $w*2upx;
  208. }
  209. @if $w < 10 {
  210. $w : $w + 1 ;
  211. } @else{
  212. $w : $w + 5 ;
  213. }
  214. }
  215. /* 字号 */
  216. @for $fz from 12 through 100 {
  217. .fz#{$fz}{
  218. font-size: $fz*2upx !important;
  219. }
  220. }
  221. /* 边距 - 覆盖顺序是小的尺寸覆盖大的尺寸 少的方向覆盖多的方向 */
  222. $s : 0 ;
  223. @while $s <= 500 {
  224. .pd#{$s}{
  225. padding: $s*2upx!important;
  226. }
  227. .m#{$s}{
  228. margin: $s*2upx!important;
  229. }
  230. @if $s == 15 {
  231. .pd{
  232. padding: 30upx!important;
  233. }
  234. .m{
  235. margin: 30upx!important;
  236. }
  237. }
  238. @if $s < 10 {
  239. $s : $s + 1 ;
  240. } @else if($s < 100){
  241. $s : $s + 5 ;
  242. } @else if($s < 300){
  243. $s : $s + 10 ;
  244. } @else{
  245. $s : $s + 50 ;
  246. }
  247. }
  248. $s : 0 ;
  249. @while $s <= 500 {
  250. .ptb#{$s}{
  251. padding-top: $s*2upx!important;
  252. padding-bottom: $s*2upx!important;
  253. }
  254. .plr#{$s}{
  255. padding-left: $s*2upx!important;
  256. padding-right: $s*2upx!important;
  257. }
  258. .mtb#{$s}{
  259. margin-top: $s*2upx!important;
  260. margin-bottom: $s*2upx!important;
  261. }
  262. .mlr#{$s}{
  263. margin-left: $s*2upx!important;
  264. margin-right: $s*2upx!important;
  265. }
  266. @if $s == 15 {
  267. .ptb{
  268. padding-top: 30upx!important;
  269. padding-bottom: 30upx!important;
  270. }
  271. .plr{
  272. padding-left: 30upx!important;
  273. padding-right: 30upx!important;
  274. }
  275. .mlr{
  276. margin-left: 30upx!important;
  277. margin-right: 30upx!important;
  278. }
  279. .mtb{
  280. margin-top: 30upx!important;
  281. margin-bottom: 30upx!important;
  282. }
  283. }
  284. @if $s < 10 {
  285. $s : $s + 1 ;
  286. } @else if($s < 100){
  287. $s : $s + 5 ;
  288. } @else if($s < 300){
  289. $s : $s + 10 ;
  290. } @else{
  291. $s : $s + 50 ;
  292. }
  293. }
  294. $s : 0 ;
  295. @while $s <= 500 {
  296. .pl#{$s}{
  297. padding-left: $s*2upx!important;
  298. }
  299. .pr#{$s}{
  300. padding-right: $s*2upx!important;
  301. }
  302. .pt#{$s}{
  303. padding-top: $s*2upx!important;
  304. }
  305. .pb#{$s}{
  306. padding-bottom: $s*2upx!important;
  307. }
  308. .ml#{$s}{
  309. margin-left: $s*2upx!important;
  310. }
  311. .mr#{$s}{
  312. margin-right: $s*2upx!important;
  313. }
  314. .mt#{$s}{
  315. margin-top: $s*2upx!important;
  316. }
  317. .mb#{$s}{
  318. margin-bottom: $s*2upx!important;
  319. }
  320. @if $s == 15 {
  321. .pt{
  322. padding-top: 30upx!important;
  323. }
  324. .pb{
  325. padding-bottom: 30upx!important;
  326. }
  327. .pl{
  328. padding-left: 30upx!important;
  329. }
  330. .pr{
  331. padding-right: 30upx!important;
  332. }
  333. .mt{
  334. margin-top: 30upx!important;
  335. }
  336. .mr{
  337. margin-right: 30upx!important;
  338. }
  339. .ml{
  340. margin-left: 30upx!important;
  341. }
  342. .mb{
  343. margin-bottom: 30upx!important;
  344. }
  345. }
  346. @if $s < 10 {
  347. $s : $s + 1 ;
  348. } @else if($s < 100){
  349. $s : $s + 5 ;
  350. } @else if($s < 300){
  351. $s : $s + 10 ;
  352. } @else{
  353. $s : $s + 50 ;
  354. }
  355. }
  356. /* 文字溢出隐藏 */
  357. .clip{
  358. width: 100%;
  359. display: -webkit-box;
  360. overflow: hidden;
  361. -webkit-line-clamp: 1;
  362. -webkit-box-orient: vertical;
  363. @for $i from 2 through 10{
  364. &.c#{$i}{
  365. -webkit-line-clamp: $i;
  366. }
  367. }
  368. }
  369. .cut{
  370. display: block;
  371. width: 100%;
  372. overflow: hidden;
  373. text-overflow: ellipsis;
  374. white-space: nowrap;
  375. }
  376. /* 价格 */
  377. .price{
  378. font-size: inherit ;
  379. &:before{
  380. content: "";
  381. font-size: 70%;
  382. color: inherit;
  383. font-weight: normal;
  384. font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif ;
  385. }
  386. .point{
  387. display: inline-block;
  388. font-size: 70%;
  389. font-weight: inherit;
  390. letter-spacing: 1px;
  391. color: inherit;
  392. }
  393. &.noPrefix{
  394. &:before{
  395. content: '';
  396. }
  397. }
  398. }
  399. /* 布局 */
  400. .grid,.gridNoPd,.gridSmPd,.gridNoMb{
  401. display: -webkit-box;
  402. display: -webkit-flex;
  403. display: -ms-flexbox;
  404. display: flex;
  405. -webkit-flex-wrap: wrap;
  406. -ms-flex-wrap: wrap;
  407. flex-wrap: wrap;
  408. width: 100%;
  409. padding: 20upx 20upx 0 20upx;
  410. >.item,>image,>view,>navigator,>text,>button{
  411. width: 50%;
  412. padding: 0 10upx;
  413. margin-bottom: 20upx;
  414. }
  415. @for $i from 1 through 50{
  416. &.g#{$i}{
  417. >.item,>image,>view,>navigator,>text,>button{
  418. width: 100%/$i;
  419. }
  420. }
  421. }
  422. }
  423. .gridNoMb{
  424. >.item,>image,>view,>navigator,>text,>button{
  425. margin-bottom: 0;
  426. }
  427. }
  428. .gridNoPd{
  429. padding: 0;
  430. >.item,>image,>view,>navigator,>text,>button{
  431. padding: 0;
  432. margin-bottom: 0;
  433. }
  434. }
  435. .gridSmPd{
  436. padding: 0;
  437. >.item,>image,>view,>navigator,>text,>button{
  438. padding-right: 0;
  439. &:first-child{
  440. padding-left: 0;
  441. padding-right: 10upx;
  442. }
  443. }
  444. }
  445. /* flex布局 */
  446. .flex{
  447. display: flex;
  448. align-items: center;
  449. justify-content: space-between;
  450. &.t{
  451. align-items: flex-start;
  452. }
  453. &.b{
  454. align-items: flex-end;
  455. }
  456. &.cv{ //垂直方向铺满
  457. align-items: stretch;
  458. }
  459. &.bk{ //水平方向铺满
  460. flex-direction: column;
  461. }
  462. &.lt{
  463. justify-content: flex-start;
  464. }
  465. &.ct{
  466. justify-content: center;
  467. }
  468. &.rt{
  469. justify-content: flex-end;
  470. }
  471. &.ar{
  472. justify-content: space-around;
  473. }
  474. &.av{
  475. >.item,view,button,navigator,image,text{
  476. flex:1;
  477. }
  478. }
  479. }
  480. /* 定位布局 */
  481. .father{
  482. position: relative;
  483. }
  484. .abs,.fixed{
  485. position: absolute;
  486. top: 0;
  487. left: 0;
  488. right: 0;
  489. bottom: 0;
  490. z-index: 1;
  491. &image{
  492. width: 100%;
  493. height: 100%;
  494. }
  495. &.top{
  496. bottom: auto;
  497. }
  498. &.bottom{
  499. top: auto;
  500. }
  501. &.left{
  502. right: auto;
  503. }
  504. &.right{
  505. left: auto;
  506. }
  507. }
  508. @for $i from 0 through 20 {
  509. .z#{$i}{
  510. z-index: $i !important;
  511. }
  512. }
  513. @for $i from 1 through 200 {
  514. .top-#{$i}{
  515. bottom: auto;
  516. top: $i * -2upx;
  517. }
  518. .left-#{$i}{
  519. right: auto;
  520. left: $i * -2upx;
  521. }
  522. .bottom-#{$i}{
  523. top: auto;
  524. bottom: $i * -2upx;
  525. }
  526. .right-#{$i}{
  527. left: auto;
  528. right: $i * -2upx;
  529. }
  530. .top#{$i}{
  531. bottom: auto;
  532. top: $i * 2upx;
  533. }
  534. .left#{$i}{
  535. right: auto;
  536. left: $i * 2upx;
  537. }
  538. .bottom#{$i}{
  539. top: auto;
  540. bottom: $i * 2upx;
  541. }
  542. .right#{$i}{
  543. left: auto;
  544. right: $i * 2upx;
  545. }
  546. .top-#{$i}p{
  547. bottom: auto;
  548. top: $i * -1%;
  549. }
  550. .left-#{$i}p{
  551. right: auto;
  552. left: $i * -1%;
  553. }
  554. .bottom-#{$i}p{
  555. top: auto;
  556. bottom: $i * -1%;
  557. }
  558. .right-#{$i}p{
  559. left: auto;
  560. right: $i * -1%;
  561. }
  562. .top#{$i}p{
  563. bottom: auto;
  564. top: $i * 1%;
  565. }
  566. .left#{$i}p{
  567. right: auto;
  568. left: $i * 1%;
  569. }
  570. .bottom#{$i}p{
  571. top: auto;
  572. bottom: $i * 1%;
  573. }
  574. .right#{$i}p{
  575. left: auto;
  576. right: $i * 1%;
  577. }
  578. }
  579. .fixed{
  580. position: fixed;
  581. }
  582. /* fix-auto布局 */
  583. .fixAuto,.fixAutoNoPd,.fixAutoSmPd{
  584. display: table;
  585. width: 100%;
  586. padding: 20upx 10upx;
  587. >.item,>view,>image,>navigator,>text,>button{
  588. vertical-align: top;
  589. padding: 0 10upx;
  590. display: table-cell ;
  591. }
  592. &.middle{
  593. >.item,>view,>image,>navigator,>text{
  594. vertical-align: middle;
  595. }
  596. }
  597. &.bottom{
  598. >.item,>view,>image,>navigator,>text{
  599. vertical-align: bottom;
  600. }
  601. }
  602. }
  603. .fixAutoSmPd{
  604. padding: 0;
  605. >.item,>view,>image,>navigator,>text{
  606. padding-right: 0;
  607. &:first-child{
  608. padding-left: 0;
  609. padding-right: 10upx;
  610. }
  611. }
  612. }
  613. .fixAutoNoPd{
  614. padding: 0;
  615. >.item,>view,>image,>navigator,>text{
  616. padding: 0;
  617. }
  618. }
  619. /* 浮动组件 */
  620. .clear{
  621. &:after{
  622. content: "";
  623. clear: both;
  624. height: 0;
  625. display: block;
  626. visibility: hidden;
  627. }
  628. }
  629. .fl{
  630. float: left;
  631. }
  632. .fr{
  633. float: right;
  634. }
  635. /* 按钮样式类 */
  636. .btn,.roundBtn{
  637. cursor: pointer;
  638. display: inline-block;
  639. text-align: center;
  640. padding: 8upx 24upx;
  641. background-color: $main;
  642. color: $mainInverse ;
  643. font-size: 28upx;
  644. border: 1px solid $main;
  645. -webkit-border-radius: 8upx;
  646. -moz-border-radius: 8upx;
  647. border-radius: 8upx;
  648. transition: 0.4s;
  649. white-space: nowrap;
  650. text-overflow: ellipsis;
  651. &.gradualBg{
  652. border-color: transparent;
  653. background-image: $mainGradual;
  654. color: $mainGradualInverse;
  655. }
  656. &.blackBg{
  657. background-color: $black;
  658. border-color: $black;
  659. color: #fff;
  660. &.shadow{
  661. box-shadow: 0px 2px 9px -1px rgba($black , 0.4);
  662. }
  663. }
  664. &.greenBg{
  665. background-color: $green;
  666. border-color: $green;
  667. color: #fff;
  668. &.shadow{
  669. box-shadow: 0px 2px 9px -1px rgba($green , 0.4);
  670. }
  671. }
  672. &.grayBg{
  673. border-color: rgba(#30302f,0.2);
  674. background-color: #f7f7f7;
  675. color: #30302f;
  676. &.shadow{
  677. box-shadow: 0px 2px 9px -1px rgba( #30302f , 0.2);
  678. }
  679. }
  680. &.whiteBg{
  681. border-color: rgba(#fff,0.2);
  682. background-color: #fff;
  683. color: #000;
  684. }
  685. &.orangeBg{
  686. border-color: $orange;
  687. background-color: $orange;
  688. color: #fff;
  689. &.shadow{
  690. box-shadow: 0px 2px 9px -1px rgba( $orange , 0.4);
  691. }
  692. }
  693. &.redBg{
  694. border-color: $red;
  695. background-color: $red;
  696. color: #fff;
  697. &.shadow{
  698. box-shadow: 0px 2px 9px -1px rgba( $red , 0.4);
  699. }
  700. }
  701. &.yellowBg{
  702. border-color: $yellow;
  703. background-color: $yellow;
  704. color: #000;
  705. &.shadow{
  706. box-shadow: 0px 2px 9px -1px rgba( $yellow , 0.4);
  707. }
  708. }
  709. &.line{
  710. background-color: transparent;
  711. background-image: none;
  712. color: $main;
  713. &.blackBg{
  714. color: $black;
  715. }
  716. &.greenBg{
  717. color: $green;
  718. }
  719. &.yellowBg{
  720. color: $yellow;
  721. }
  722. &.grayBg{
  723. color: #30302f;
  724. }
  725. &.whiteBg{
  726. border-color: rgba(#fff,0.7);
  727. color: #fff;
  728. }
  729. &.orangeBg{
  730. color: $orange;
  731. }
  732. &.redBg{
  733. color: $red;
  734. }
  735. }
  736. &+.btn,&+.roundBtn{
  737. margin-left: 20upx;
  738. }
  739. &.block{
  740. margin: 0;
  741. padding: 20upx 24upx;
  742. display: block;
  743. width: 100%;
  744. &+.btn{
  745. margin-left: 0;
  746. }
  747. }
  748. &:hover{
  749. -webkit-transform: scale(0.99);
  750. -moz-transform: scale(0.99);
  751. -ms-transform: scale(0.99);
  752. -o-transform: scale(0.99);
  753. transform: scale(0.99);
  754. opacity: 0.8;
  755. }
  756. &.disabled{
  757. -webkit-transform: scale(1);
  758. -moz-transform: scale(1);
  759. -ms-transform: scale(1);
  760. -o-transform: scale(1);
  761. transform: scale(1);
  762. opacity: 0.4;
  763. cursor: not-allowed;
  764. }
  765. }
  766. [class^="tag"] , [class*=" tag"]{
  767. display: inline-block;
  768. font-size: 24upx;
  769. padding: 4upx 14upx;
  770. border-radius: 4upx;
  771. margin-right: 6upx;
  772. margin-left: 6upx;
  773. }
  774. .tag{
  775. background-color: rgba($main,0.2);
  776. color: $main;
  777. }
  778. .tagBlue{
  779. background-color: rgba($blue,0.2);
  780. color: $blue;
  781. }
  782. .tagGray{
  783. background-color: rgba($gray,0.2);
  784. color: $gray;
  785. }
  786. .tagGradual{
  787. background-image: linear-gradient(to top right,rgba($main,0.2),rgba($main,0.1));
  788. color: $main;
  789. }
  790. .tagBlack{
  791. background-color: rgba($black,0.2);
  792. color: $black;
  793. }
  794. .tagGreen{
  795. background-color: rgba($green,0.2);
  796. color: $green;
  797. }
  798. .tagWhite{
  799. background-color: rgba($white,0.2);
  800. color: $white;
  801. }
  802. .tagOrange{
  803. background-color: rgba($orange,0.2);
  804. color: $orange;
  805. }
  806. .tagRed{
  807. background-color: rgba($red,0.2);
  808. color: $red;
  809. }
  810. .tagYellow{
  811. background-color: rgba($yellow,0.2);
  812. color: $yellow;
  813. }
  814. /* 边线(实线、虚线) */
  815. .bdn{
  816. border: none;
  817. }
  818. .bd{
  819. border: 1px solid $borderColor;
  820. &.dashed{
  821. border-style: dashed;
  822. }
  823. }
  824. .bt{
  825. border-top:1px solid $borderColor;
  826. &.dashed{
  827. border-top-style: dashed;
  828. }
  829. }
  830. .bb{
  831. border-bottom:1px solid $borderColor;
  832. &.dashed{
  833. border-bottom-style: dashed;
  834. }
  835. }
  836. .bl{
  837. border-left:1px solid $borderColor;
  838. &.dashed{
  839. border-left-style: dashed;
  840. }
  841. }
  842. .br{
  843. border-right: 1px solid $borderColor;
  844. &.dashed{
  845. border-right-style: dashed;
  846. }
  847. }
  848. $b:2;
  849. @while $b <= 10 {
  850. .bd#{$b}{
  851. border: #{$b}px solid $borderColor;
  852. &.dashed{
  853. border-style: dashed;
  854. }
  855. }
  856. .bt#{$b}{
  857. border-top:#{$b}px solid $borderColor;
  858. &.dashed{
  859. border-top-style: dashed;
  860. }
  861. }
  862. .bb#{$b}{
  863. border-bottom:#{$b}px solid $borderColor;
  864. &.dashed{
  865. border-bottom-style: dashed;
  866. }
  867. }
  868. .bl#{$b}{
  869. border-left:#{$b}px solid $borderColor;
  870. &.dashed{
  871. border-left-style: dashed;
  872. }
  873. }
  874. .br#{$b}{
  875. border-right: #{$b}px solid $borderColor;
  876. &.dashed{
  877. border-right-style: dashed;
  878. }
  879. }
  880. $b : $b + 1 ;
  881. }
  882. /* 边线颜色 */
  883. .mainBd{
  884. border-color: $main;
  885. }
  886. .greenBd{
  887. border-color: $green;
  888. }
  889. .redBd{
  890. border-color: $red;
  891. }
  892. .yellowBd{
  893. border-color:$yellow ;
  894. }
  895. .blackBd{
  896. border-color: $black;
  897. }
  898. .whiteBd{
  899. border-color:$white ;
  900. }
  901. .grayBd{
  902. border-color:$gray;
  903. }
  904. .greyBd{
  905. border-color:$grey;
  906. }
  907. .orangeBd{
  908. border-color:$orange;
  909. }
  910. /* 圆角 */
  911. .radius,.rds{
  912. -webkit-border-radius: 100%!important;
  913. -moz-border-radius: 100%!important;
  914. border-radius: 100%!important;
  915. }
  916. $r:0;
  917. @while $r <= 50{
  918. .rds#{$r},&.radius#{$r}{
  919. -webkit-border-radius:$r*2upx!important;
  920. -moz-border-radius:$r*2upx!important;
  921. border-radius:$r*2upx!important;
  922. }
  923. $r : $r + 1;
  924. }
  925. .rdsTl,.radiusTopLeft{
  926. border-top-left-radius:100%!important;
  927. }
  928. .rdsTr,.radiusTopRight{
  929. border-top-right-radius: 100%!important;
  930. }
  931. .rdsBl,.radiusBottomLeft{
  932. border-bottom-left-radius: 100%!important;
  933. }
  934. .rdsBr,.radiusBottomRight{
  935. border-bottom-right-radius: 100%!important;
  936. }
  937. $r:0;
  938. @while $r <= 50{
  939. .rdsTl#{$r},.radiusTopLeft#{$r}{
  940. border-top-left-radius: $r*2upx!important;
  941. }
  942. .rdsTr#{$r},.radiusTopRight#{$r}{
  943. border-top-right-radius: $r*2upx!important;
  944. }
  945. .rdsBl#{$r},.radiusBottomLeft#{$r}{
  946. border-bottom-left-radius: $r*2upx!important;
  947. }
  948. .rdsBr#{$r},.radiusBottomRight#{$r}{
  949. border-bottom-right-radius: $r*2upx!important;
  950. }
  951. $r : $r + 1;
  952. }
  953. /* 正方形&长方形 */
  954. [class^="square"] , [class*=" square"]{
  955. width: 100%;
  956. position: relative;
  957. height: auto;
  958. >.item,>image,>view,>navigator,>text,>button{
  959. position: absolute;
  960. top: 0;
  961. left: 0;
  962. width: 100%;
  963. height: 100%;
  964. }
  965. }
  966. $p : 200 ;
  967. @while $p > 0 {
  968. .square#{$p}{
  969. padding-top: $p*1%;
  970. }
  971. @if $p == 100 {
  972. .square{
  973. padding-top: 100%;
  974. }
  975. }
  976. $p : $p - 5 ;
  977. }
  978. /* 阴影 */
  979. .shadow{
  980. box-shadow: 0px 2px 9px -1px rgba(0, 0, 0, 0.1);
  981. }
  982. /* 遮罩层 */
  983. .wrapper-top,.wt{
  984. background-image: linear-gradient(rgba(0,0,0,0.3) , rgba(0,0,0,0.02));
  985. }
  986. .wrapper-bottom,.wb{
  987. background-image: linear-gradient( rgba(0,0,0,0.02) , rgba(0,0,0,0.3) );
  988. }
  989. [class^="wp"],[class*=" wp"] {
  990. z-index: 10;
  991. }
  992. /* 透明度 */
  993. @for $op from 0 through 10 {
  994. .op#{$op}{
  995. opacity: $op * 0.1!important;
  996. }
  997. .wp#{$op}{
  998. background-color: rgba(#000,$op*0.1);
  999. }
  1000. @if $op == 5 {
  1001. .wp{
  1002. background-color: rgba(#000,0.5);
  1003. }
  1004. }
  1005. }
  1006. /* 分割线 */
  1007. [class*=" split"],[class^="split"] {
  1008. position: relative;
  1009. &:before{
  1010. content:"";
  1011. display: block;
  1012. position: absolute;
  1013. left: 0;
  1014. top: 50%;
  1015. border-left: 1px solid $borderColor;
  1016. }
  1017. }
  1018. $s:10;
  1019. @while $s <= 100 {
  1020. .split#{$s}{
  1021. &:before{
  1022. height: #{$s*2}upx;
  1023. margin-top: -#{$s}upx;
  1024. }
  1025. }
  1026. @if $s == 10 {
  1027. .split{
  1028. &:before{
  1029. height: 20upx;
  1030. margin-top: -10upx;
  1031. }
  1032. }
  1033. }
  1034. $s:$s+2;
  1035. }
  1036. .hover,[class^="hover"],[class*=" hover"]{
  1037. transition: all 0.4s;
  1038. cursor: pointer;
  1039. &:hover{
  1040. opacity: 0.8 !important;
  1041. }
  1042. }
  1043. .statusBar{
  1044. height: var(--status-bar-height);
  1045. }
  1046. .winBottom{
  1047. height: var(--windown-bottom);
  1048. }
  1049. .safeBottom{
  1050. padding-bottom: constant(safe-area-inset-bottom);
  1051. padding-bottom: env(safe-area-inset-bottom);
  1052. }
  1053. .disabled{
  1054. opacity:0.8;
  1055. cursor: not-allowed;
  1056. }
  1057. .grid,.gridNoMb,.gridNoPd{
  1058. >.btn,>.roundBtn{
  1059. &+.btn,&+.roundBtn{
  1060. margin-left: 0 ;
  1061. }
  1062. }
  1063. }
  1064. .roundBtn{
  1065. -webkit-border-radius: 100upx;
  1066. -moz-border-radius: 100upx;
  1067. border-radius: 100upx;
  1068. }
  1069. /* 位置 */
  1070. .text-center,.tc{
  1071. text-align: center!important;
  1072. }
  1073. .text-left,.tl{
  1074. text-align: left!important;
  1075. }
  1076. .text-right,.tr{
  1077. text-align: right!important;
  1078. }
  1079. .text-justify,.tj{
  1080. text-align: justify!important;
  1081. }
  1082. .text-bold,.bold{
  1083. font-weight: bold!important;
  1084. }
  1085. .text-normal,.normal{
  1086. font-weight: normal!important;
  1087. }
  1088. .break{
  1089. white-space: normal;
  1090. word-break: break-all;
  1091. }
  1092. .noBreak{
  1093. white-space: nowrap;
  1094. word-break: keep-all;
  1095. }
  1096. .inline{
  1097. display: inline-block;
  1098. }
  1099. .block{
  1100. display: block;
  1101. width: 100%;
  1102. }
  1103. .none{
  1104. display: none;
  1105. }
  1106. .center-block{
  1107. margin: 0 auto;
  1108. display: block;
  1109. }
  1110. .hidden{
  1111. overflow: hidden;
  1112. }
  1113. .hiddenX{
  1114. overflow-x: hidden;
  1115. }
  1116. .hiddenY{
  1117. overflow-y: hidden;
  1118. }
  1119. .auto{
  1120. overflow: auto;
  1121. }
  1122. .autoX{
  1123. overflow-x: auto;
  1124. }
  1125. .autoY{
  1126. overflow-y: auto;
  1127. }
  1128. .showInMb{
  1129. display: block;
  1130. }
  1131. .showInPc{
  1132. display: none;
  1133. }
  1134. table{
  1135. width: 100%;
  1136. border-collapse: collapse;
  1137. border-spacing: 0;
  1138. border: 1px solid #e6e6e6;
  1139. thead{
  1140. tr{
  1141. background-color: #f2f2f2;
  1142. th{
  1143. color: #8799a3;
  1144. width: 1%;
  1145. }
  1146. }
  1147. }
  1148. tr{
  1149. background-color: #fff;
  1150. transition: all 0.4s;
  1151. td,th{
  1152. border: 1px solid #e6e6e6;
  1153. overflow: hidden;
  1154. -o-text-overflow: ellipsis;
  1155. text-overflow: ellipsis;
  1156. white-space: nowrap;
  1157. word-wrap: break-word;
  1158. padding: 5px 10px;
  1159. height: 28px;
  1160. line-height: 28px;
  1161. &.autoWidth{
  1162. width: auto;
  1163. }
  1164. }
  1165. &:hover{
  1166. background-color: #f2f2f2;
  1167. }
  1168. }
  1169. }