阅行客电子档案
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
710 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div @click="toggleClick">
  3. <i
  4. :class="[{'is-active':isActive}, 'hamburger iconfont icon-shouqi']"
  5. />
  6. </div>
  7. </template>
  8. <script>
  9. export default {
  10. name: 'Hamburger',
  11. props: {
  12. isActive: {
  13. type: Boolean,
  14. default: false
  15. }
  16. },
  17. methods: {
  18. toggleClick() {
  19. this.$emit('toggleClick')
  20. }
  21. }
  22. }
  23. </script>
  24. <style lang="scss" scoped>
  25. @mixin hamburger-icon{
  26. [data-theme="dark"] & {
  27. color: #fff;
  28. }
  29. }
  30. .hamburger {
  31. display: inline-block;
  32. vertical-align: middle;
  33. font-size: 10px;
  34. transform: rotate(-180deg);
  35. @include hamburger-icon;
  36. }
  37. .hamburger.is-active {
  38. transform: rotate(0);
  39. }
  40. </style>