Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Jun 4, 2024
1 parent 9a66a90 commit 26f1b37
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 32 deletions.
9 changes: 4 additions & 5 deletions src/layout/components/lay-content/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
import { useI18n } from "vue-i18n";
import LayFrame from "../lay-frame/index.vue";
import LayFooter from "../lay-footer/index.vue";
import { useTags } from "@/layout/hooks/useTag";
import { useGlobal, isNumber } from "@pureadmin/utils";
import BackTopIcon from "@/assets/svg/back_top.svg?component";
import { h, computed, Transition, defineComponent } from "vue";
import { usePermissionStoreHook } from "@/store/modules/permission";
import { useTags } from "@/layout/hooks/useTag";
const props = defineProps({
fixedHeader: Boolean
});
const { t } = useI18n();
const { $storage, $config } = useGlobal<GlobalPropertiesApi>();
const { showModel } = useTags();
const { $storage, $config } = useGlobal<GlobalPropertiesApi>();
const isKeepAlive = computed(() => {
return $config?.KeepAlive;
Expand Down Expand Up @@ -56,13 +55,13 @@ const getSectionStyle = computed(() => {
hideTabs.value && layout ? "padding-top: 48px;" : "",
!hideTabs.value && layout
? showModel.value == "chrome"
? "padding-top: 87px;"
? "padding-top: 85px;"
: "padding-top: 81px;"
: "",
hideTabs.value && !layout.value ? "padding-top: 48px;" : "",
!hideTabs.value && !layout.value
? showModel.value == "chrome"
? "padding-top: 87px;"
? "padding-top: 85px;"
: "padding-top: 81px;"
: "",
props.fixedHeader
Expand Down
33 changes: 10 additions & 23 deletions src/layout/components/lay-tag/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@
white-space: nowrap;

&.chrome-scroll-container {
padding-top: 6px;
padding-top: 4px;

.fixed-tag {
padding: 0 !important;
}
}

.tab {
Expand All @@ -97,15 +101,15 @@
.scroll-item {
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);

&:nth-child(1) {
padding: 0 12px;
}

&.chrome-item {
&:nth-child(1) {
padding-right: 0;
padding: 0;
}
}

&:nth-child(1) {
padding: 0 12px;
}
}

.fixed-tag {
Expand Down Expand Up @@ -365,20 +369,3 @@
}
}
}

// 暗黑模式下chrome-tab的样式
html.dark .chrome-tab {
.tag-title {
color: #666;
}

&:hover {
.chrome-tab__bg {
color: #333;
}

.tag-title {
color: #adadad;
}
}
}
7 changes: 3 additions & 4 deletions src/layout/components/lay-tag/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { RouteConfigs } from "../../types";
import { useTags } from "../../hooks/useTag";
import { routerArrays } from "@/layout/types";
import { onClickOutside } from "@vueuse/core";
import TagChrome from "./components/TagChrome.vue";
import { handleAliveRoute, getTopMenu } from "@/router/utils";
import { useSettingStoreHook } from "@/store/modules/settings";
import { useMultiTagsStoreHook } from "@/store/modules/multiTags";
Expand All @@ -23,8 +24,6 @@ import ArrowDown from "@iconify-icons/ri/arrow-down-s-line";
import ArrowRightSLine from "@iconify-icons/ri/arrow-right-s-line";
import ArrowLeftSLine from "@iconify-icons/ri/arrow-left-s-line";
import ChromeTabBg from "./chrome-tab-bg.vue";
const {
Close,
route,
Expand Down Expand Up @@ -612,13 +611,13 @@ onBeforeUnmount(() => {
</template>
<div v-else class="chrome-tab">
<div class="chrome-tab__bg">
<ChromeTabBg />
<TagChrome />
</div>
<span class="tag-title">
{{ transformI18n(item.meta.title) }}
</span>
<span
v-if="index !== 0"
v-if="isAllEmpty(item?.meta?.fixedTag) ? index !== 0 : false"
class="chrome-close-btn"
@click.stop="deleteMenu(item)"
>
Expand Down
16 changes: 16 additions & 0 deletions src/style/dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,22 @@ html.dark {
background-color: rgb(255 255 255 / 12%);
}
}

.chrome-tab {
.tag-title {
color: #666;
}

&:hover {
.chrome-tab__bg {
color: #333;
}

.tag-title {
color: #adadad;
}
}
}
}
}

Expand Down

0 comments on commit 26f1b37

Please sign in to comment.