closeFull.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <div class="layout-navbars-close-full" v-if="isTagsViewCurrenFull">
  3. <div class="layout-navbars-close-full-icon">
  4. <SvgIcon name="ele-Close" :title="$t('message.tagsView.closeFullscreen')" @click="onCloseFullscreen" />
  5. </div>
  6. </div>
  7. </template>
  8. <script setup lang="ts" name="layoutCloseFull">
  9. import { storeToRefs } from 'pinia';
  10. import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
  11. // 定义变量内容
  12. const stores = useTagsViewRoutes();
  13. const { isTagsViewCurrenFull } = storeToRefs(stores);
  14. // 关闭当前全屏
  15. const onCloseFullscreen = () => {
  16. stores.setCurrenFullscreen(false);
  17. };
  18. </script>
  19. <style scoped lang="scss">
  20. .layout-navbars-close-full {
  21. position: fixed;
  22. z-index: 9999999999;
  23. right: -30px;
  24. top: -30px;
  25. .layout-navbars-close-full-icon {
  26. width: 60px;
  27. height: 60px;
  28. border-radius: 100%;
  29. cursor: pointer;
  30. background: rgba(0, 0, 0, 0.1);
  31. transition: all 0.3s ease;
  32. position: relative;
  33. :deep(i) {
  34. position: absolute;
  35. left: 10px;
  36. top: 35px;
  37. color: #333333;
  38. transition: all 0.3s ease;
  39. }
  40. }
  41. &:hover {
  42. transition: all 0.3s ease;
  43. :deep(i) {
  44. color: var(--el-color-primary);
  45. transition: all 0.3s ease;
  46. }
  47. }
  48. }
  49. </style>