table-checkbox.wxss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. @charset "UTF-8";
  2. /**
  3. * 这里是uni-app内置的常用样式变量
  4. *
  5. * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  6. * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  7. *
  8. */
  9. /**
  10. * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  11. *
  12. * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  13. */
  14. /* 颜色变量 */
  15. /* 行为相关颜色 */
  16. /* 文字基本颜色 */
  17. /* 背景颜色 */
  18. /* 边框颜色 */
  19. /* 尺寸变量 */
  20. /* 文字尺寸 */
  21. /* 图片尺寸 */
  22. /* Border Radius */
  23. /* 水平间距 */
  24. /* 垂直间距 */
  25. /* 透明度 */
  26. /* 文章场景相关 */
  27. .uni-table-checkbox {
  28. display: flex;
  29. flex-direction: row;
  30. align-items: center;
  31. justify-content: center;
  32. position: relative;
  33. margin: 5px 0;
  34. cursor: pointer;
  35. }
  36. .uni-table-checkbox .checkbox__inner {
  37. flex-shrink: 0;
  38. box-sizing: border-box;
  39. position: relative;
  40. width: 16px;
  41. height: 16px;
  42. border: 1px solid #DCDFE6;
  43. border-radius: 2px;
  44. background-color: #fff;
  45. z-index: 1;
  46. }
  47. .uni-table-checkbox .checkbox__inner .checkbox__inner-icon {
  48. position: absolute;
  49. top: 2px;
  50. left: 5px;
  51. height: 7px;
  52. width: 3px;
  53. border: 1px solid #fff;
  54. border-left: 0;
  55. border-top: 0;
  56. opacity: 0;
  57. -webkit-transform-origin: center;
  58. transform-origin: center;
  59. -webkit-transform: rotate(45deg);
  60. transform: rotate(45deg);
  61. box-sizing: content-box;
  62. }
  63. .uni-table-checkbox .checkbox__inner.checkbox--indeterminate {
  64. border-color: #007aff;
  65. background-color: #007aff;
  66. }
  67. .uni-table-checkbox .checkbox__inner.checkbox--indeterminate .checkbox__inner-icon {
  68. position: absolute;
  69. opacity: 1;
  70. -webkit-transform: rotate(0deg);
  71. transform: rotate(0deg);
  72. height: 2px;
  73. top: 0;
  74. bottom: 0;
  75. margin: auto;
  76. left: 0px;
  77. right: 0px;
  78. bottom: 0;
  79. width: auto;
  80. border: none;
  81. border-radius: 2px;
  82. -webkit-transform: scale(0.5);
  83. transform: scale(0.5);
  84. background-color: #fff;
  85. }
  86. .uni-table-checkbox .checkbox__inner:hover {
  87. border-color: #007aff;
  88. }
  89. .uni-table-checkbox .checkbox__inner.is-disable {
  90. background-color: #F2F6FC;
  91. border-color: #DCDFE6;
  92. }
  93. .uni-table-checkbox .checkbox__inner.is-checked {
  94. border-color: #007aff;
  95. background-color: #007aff;
  96. }
  97. .uni-table-checkbox .checkbox__inner.is-checked .checkbox__inner-icon {
  98. opacity: 1;
  99. -webkit-transform: rotate(45deg);
  100. transform: rotate(45deg);
  101. }
  102. .uni-table-checkbox .checkbox__inner.is-checked.is-disable {
  103. opacity: 0.4;
  104. }