TabIconButton.vue 959 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <div
  3. class="tab-icon-button"
  4. :class="active ? 'active' : ''"
  5. >{{ tab.unicode }}</div>
  6. </template>
  7. <script>
  8. export default {
  9. props: ['tab', 'active', 'handleClick']
  10. }
  11. </script>
  12. <style lang="scss" scoped>
  13. @import '~@/style/theme.scss';
  14. .tab-icon-button {
  15. -webkit-tap-highlight-color: transparent;
  16. z-index: 2;
  17. overflow: hidden;
  18. user-select: none;
  19. position: relative;
  20. width: 42px;
  21. height: 42px;
  22. display: flex;
  23. align-items: center;
  24. justify-content: center;
  25. border-radius: 1000px;
  26. cursor: pointer;
  27. text-align: center;
  28. font-family: 'iconfont', sans-serif;
  29. font-size: 34px;
  30. color: $icon-normal-color;
  31. transition: color 0.1s ease-out;
  32. &:hover {
  33. color: $icon-hover-color;
  34. }
  35. }
  36. .active {
  37. color: $theme-blue;
  38. }
  39. .line {
  40. height: 0;
  41. padding: 6px;
  42. margin: 0 4px 12px 4px;
  43. border-bottom: 2px solid $icon-normal-color;
  44. }
  45. a {
  46. outline: none;
  47. text-decoration: none;
  48. color: black;
  49. }
  50. </style>