index.vue 500 B

12345678910111213141516171819202122
  1. <script lang="ts" setup>
  2. import { useSettingsStore } from '@/store/modules/settings'
  3. const settingsStore = useSettingsStore()
  4. const { collapse } = storeToRefs(settingsStore)
  5. const { toggleCollapse } = settingsStore
  6. </script>
  7. <template>
  8. <vab-icon
  9. class="fold-unfold"
  10. :icon="collapse ? 'menu-unfold-line' : 'menu-fold-line'"
  11. @click="toggleCollapse"
  12. />
  13. </template>
  14. <style lang="scss" scoped>
  15. .fold-unfold {
  16. color: var(--el-color-grey);
  17. cursor: pointer;
  18. }
  19. </style>