SelectGroup.vue 915 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <div class="select-group">
  3. <slot></slot>
  4. </div>
  5. </template>
  6. <script lang="ts" setup>
  7. </script>
  8. <style lang="scss" scoped>
  9. .select-group {
  10. display: flex;
  11. align-items: center;
  12. ::v-deep(.select-wrap) {
  13. .select {
  14. border-radius: 0;
  15. border-left-width: 0;
  16. border-right-width: 0;
  17. }
  18. & + .select-wrap {
  19. .select {
  20. border-left-width: 1px;
  21. }
  22. }
  23. &:hover {
  24. & + .select-wrap {
  25. .select {
  26. border-left-color: $themeColor;
  27. }
  28. }
  29. }
  30. &:first-child {
  31. .select {
  32. border-top-left-radius: $borderRadius;
  33. border-bottom-left-radius: $borderRadius;
  34. border-left-width: 1px;
  35. }
  36. }
  37. &:last-child {
  38. .select {
  39. border-top-right-radius: $borderRadius;
  40. border-bottom-right-radius: $borderRadius;
  41. border-right-width: 1px;
  42. }
  43. }
  44. }
  45. }
  46. </style>