CheckboxButtonGroup.vue 816 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <div class="checkbox-button-group">
  3. <slot></slot>
  4. </div>
  5. </template>
  6. <script lang="ts">
  7. export default {
  8. name: 'checkbox-button-group',
  9. }
  10. </script>
  11. <style lang="scss" scoped>
  12. .checkbox-button-group {
  13. display: flex;
  14. align-items: center;
  15. ::v-deep .checkbox-button {
  16. border-radius: 0;
  17. border-left-width: 0;
  18. border-right-width: 0;
  19. display: inline-block;
  20. & + .checkbox-button {
  21. border-left-width: 1px;
  22. }
  23. &:first-child {
  24. border-top-left-radius: $borderRadius;
  25. border-bottom-left-radius: $borderRadius;
  26. border-left-width: 1px;
  27. }
  28. &:last-child {
  29. border-top-right-radius: $borderRadius;
  30. border-bottom-right-radius: $borderRadius;
  31. border-right-width: 1px;
  32. }
  33. }
  34. }
  35. </style>