♻️ 部分组件ZIndex抽离

This commit is contained in:
BTMuli
2025-12-21 18:40:50 +08:00
parent 8adedada19
commit c562424af9
9 changed files with 188 additions and 185 deletions

View File

@@ -1,7 +1,8 @@
<!-- 回顶组件 -->
<template>
<transition name="fade">
<div v-show="canTop" class="back-top" @click="handleScrollTop">
<img src="@/assets/icons/back-top.svg" alt="back-icon" />
<img alt="back-icon" src="@/assets/icons/back-top.svg" />
</div>
</transition>
</template>
@@ -39,10 +40,10 @@ function handleScrollTop(): void {
onMounted(() => window.addEventListener("scroll", handleScroll));
onUnmounted(() => window.removeEventListener("scroll", handleScroll));
</script>
<style lang="css" scoped>
<style lang="scss" scoped>
.back-top {
position: fixed;
z-index: 1;
z-index: var(--tgi-top);
right: 10px;
bottom: 10px;
width: 40px;