fs-cell-group.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="fs-cell-group" :class="{full, radius}" :style="{backgroundColor:bgColor || '#fff'}">
  3. <slot />
  4. </view>
  5. </template>
  6. <script setup>
  7. import { provide, toRefs } from 'vue'
  8. const props = defineProps({
  9. titleWidth: String,
  10. arrow: Boolean,
  11. arrowColor: {
  12. type: String,
  13. default: ''
  14. },
  15. arrowColorType: {
  16. type: String,
  17. validator(value) {
  18. return ['primary', 'success', 'info', 'warning', 'danger'].includes(value)
  19. }
  20. },
  21. border: Boolean,
  22. tighten: Boolean,
  23. radius: {
  24. type: Boolean,
  25. default: true
  26. },
  27. reverse: Boolean,
  28. align: {
  29. type: String,
  30. default: 'center'
  31. },
  32. justify: {
  33. type: String,
  34. default: 'left',
  35. validator(value) {
  36. return ['left', 'center', 'right'].includes(value)
  37. }
  38. },
  39. bgColor: {
  40. type: String,
  41. },
  42. full: Boolean
  43. })
  44. provide('cellGroup', props)
  45. </script>
  46. <style lang="scss" scoped>
  47. .fs-cell-group{
  48. margin: 0 var(--gutter);
  49. overflow: hidden;
  50. position: relative;
  51. &::after{
  52. position: absolute;
  53. bottom: 0;
  54. left: 0;
  55. height: 2rpx;
  56. width: 100%;
  57. background-color: #fff;
  58. z-index: 10;
  59. content: '';
  60. }
  61. &.full{
  62. margin: 0;
  63. }
  64. &.radius{
  65. border-radius: var(--radius);
  66. }
  67. }
  68. </style>