common.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. // 设置页面属性
  2. page{
  3. background-color: #fff;
  4. color: #000;
  5. height: 100vh;
  6. }
  7. uni-toast,
  8. [longpressactions]{
  9. z-index: 99999!important;
  10. }
  11. .page_padding{
  12. padding-left: 24rpx;
  13. padding-right: 24rpx;
  14. }
  15. // 居中
  16. .text_center{
  17. text-align: center;
  18. }
  19. // 居左
  20. .text_left{
  21. text-align: left;
  22. }
  23. // 两端对齐
  24. .text_justify{
  25. text-align: justify;
  26. }
  27. // 按钮样式-绿色
  28. .primaryButton{
  29. color: #fff!important;
  30. background-color: $uni-primary!important;
  31. border-color: $uni-primary!important;
  32. }
  33. // 按钮样式-灰色
  34. .cancelButton{
  35. color: #fff!important;
  36. background-color: $uni-info!important;
  37. border-color: $uni-info!important;
  38. }
  39. // 底部按钮
  40. .foot_common_btns{
  41. width: 100%;
  42. box-sizing: border-box;
  43. margin-bottom: 24rpx;
  44. padding: 0 24rpx;
  45. display: flex;
  46. align-items: center;
  47. gap: 24rpx;
  48. .btn{
  49. flex: 1;
  50. }
  51. }
  52. // 必填标识
  53. .required{
  54. color: #f00;
  55. font-size: 20rpx;
  56. }
  57. // flex:1
  58. .flex1{
  59. flex: 1;
  60. }
  61. // lable
  62. .label{
  63. margin-right: 35rpx;
  64. display: flex;
  65. align-items: center;
  66. font-size: 26rpx;
  67. }
  68. // easyinput边框选中色
  69. .is-focused{
  70. border-color: $uni-primary!important;
  71. }
  72. // 弹窗两端对齐
  73. .uni-modal__bd{
  74. text-align: justify;
  75. }
  76. // 按钮组
  77. .btns{
  78. display: flex;
  79. justify-content: space-between;
  80. align-items: center;
  81. padding-top: 24rpx;
  82. .btn{
  83. flex: 1;
  84. margin-right: 24rpx;
  85. &:last-of-type{
  86. margin-right: 0;
  87. }
  88. }
  89. }
  90. // 单行省略
  91. .ellipsis {
  92. white-space: nowrap; /* 确保文本在一行内显示 */
  93. overflow: hidden; /* 隐藏超出容器的文本 */
  94. text-overflow: ellipsis; /* 使用省略符号表示文本被截断 */
  95. }
  96. // 两行省略
  97. .ellipsis-multiline {
  98. display: -webkit-box;
  99. -webkit-box-orient: vertical;
  100. -webkit-line-clamp: 2; /* 定义显示的行数 */
  101. overflow: hidden;
  102. text-overflow: ellipsis;
  103. }
  104. // 透明
  105. .transparent{
  106. opacity: 0;
  107. }
  108. // 下拉框边框红色
  109. .formRed{
  110. .uni-select,
  111. .uni-easyinput__content{
  112. border: 1px solid red!important;
  113. }
  114. }