diff --git a/src/layout/components/tag/index.scss b/src/layout/components/tag/index.scss index 2ada56b7b..8ed5fde32 100644 --- a/src/layout/components/tag/index.scss +++ b/src/layout/components/tag/index.scss @@ -124,12 +124,6 @@ } } } - - .scrollbar-wrapper { - position: absolute; - height: 40px; - overflow-x: hidden !important; - } } .right-button { diff --git a/src/layout/components/tag/index.vue b/src/layout/components/tag/index.vue index dbfd86f42..5b811cb4a 100644 --- a/src/layout/components/tag/index.vue +++ b/src/layout/components/tag/index.vue @@ -40,12 +40,7 @@ import { useRoute, useRouter } from "vue-router"; import { handleAliveRoute, delAliveRoutes } from "/@/router"; import { usePermissionStoreHook } from "/@/store/modules/permission"; import { toggleClass, removeClass, hasClass } from "/@/utils/operate"; -import { - RouteConfigs, - relativeStorageType, - tagsViewsType, - scrollbarDomType -} from "../../types"; +import { RouteConfigs, relativeStorageType, tagsViewsType } from "../../types"; const route = useRoute(); const router = useRouter(); @@ -57,11 +52,11 @@ let relativeStorage: relativeStorageType; const showTags = ref(storageLocal.getItem("tagsVal") || false); const tabDom = templateRef("tabDom", null); const containerDom = templateRef("containerDom", null); -const scrollbarDom = templateRef("scrollbarDom", null); +const scrollbarDom = templateRef("scrollbarDom", null); const handleScroll = (offset: number): void => { - const scrollbarDomWidth = scrollbarDom.value?.wrap - ? scrollbarDom.value?.wrap.offsetWidth + const scrollbarDomWidth = scrollbarDom.value + ? scrollbarDom.value?.offsetWidth : 0; const tabDomWidth = tabDom.value ? tabDom.value.offsetWidth : 0; if (offset > 0) { @@ -498,12 +493,7 @@ onBeforeMount(() => {