common.scss 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // 设置页面属性
  2. page{
  3. background-color: #fff;
  4. color: #000;
  5. height: calc(100vh - 50px);
  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. .required{
  35. color: #f00;
  36. font-size: 20rpx;
  37. }
  38. // flex:1
  39. .flex1{
  40. flex: 1;
  41. }
  42. // lable
  43. .label{
  44. margin-right: 35rpx;
  45. display: flex;
  46. align-items: center;
  47. font-size: 26rpx;
  48. }
  49. // easyinput边框选中色
  50. .is-focused{
  51. border-color: $uni-primary!important;
  52. }
  53. // 弹窗两端对齐
  54. .uni-modal__bd{
  55. text-align: justify;
  56. }
  57. // 按钮组
  58. .btns{
  59. display: flex;
  60. justify-content: space-between;
  61. align-items: center;
  62. padding-top: 24rpx;
  63. .btn{
  64. flex: 1;
  65. margin-right: 24rpx;
  66. &:last-of-type{
  67. margin-right: 0;
  68. }
  69. }
  70. }
  71. // 单行省略
  72. .ellipsis {
  73. white-space: nowrap; /* 确保文本在一行内显示 */
  74. overflow: hidden; /* 隐藏超出容器的文本 */
  75. text-overflow: ellipsis; /* 使用省略符号表示文本被截断 */
  76. }
  77. // 两行省略
  78. .ellipsis-multiline {
  79. display: -webkit-box;
  80. -webkit-box-orient: vertical;
  81. -webkit-line-clamp: 2; /* 定义显示的行数 */
  82. overflow: hidden;
  83. text-overflow: ellipsis;
  84. }