z自定义指令

This commit is contained in:
李志鹏
2026-05-14 14:23:32 +08:00
parent 2ab2466f3d
commit 25919e5b1b
8 changed files with 155 additions and 92 deletions

View File

@@ -0,0 +1,20 @@
<template>
<header class="main-header" v-scroll-progress></header>
</template>
<script setup lang="ts">
import { ref, onMounted, onUnmounted } from "vue";
</script>
<style lang="less" scoped>
.main-header {
position: fixed;
width: 100%;
height: 85px;
top: 0;
left: 0;
z-index: 10000;
transition: background-color 0.2s linear;
&.active {
background-color: #0a0a0a;
}
}
</style>