
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
vue3-progress-scroll
Advanced tools
🎉🎉🤖 `vue3-progress-scroll` 轻量版 滚动进度可视化插件, 融入 Vue3 Hooks, 更方便使用, 感受开发的乐趣 ~
🤖🎉🎉 进度监控可视化插件是一个基于 原生
Css + Vue3 钩子封装的实用 hooks 工具,用于在 Vue.js 应用程序中展示进度。它提供了一种简单、高效的操作体验、深深感受开发的乐趣 ~
你可以使用 npm 或 pnpm 安装插件:
npm i vue3-progress-scroll
在你的主应用程序入口文件(例如 main.js)中,导入并使用 :
main.js
/* Step 1
------------------------------------------------------------------ */
import { useScroll } from "vue3-progress-scroll";
const app = createApp(App);
app.use(useScroll);
/* Step 2
------------------------------------------------------------------ */
// 注册插件并提供自定义的进度条属性(可选)例如:
app.use(useScroll, {
progress: "green", // 进度条颜色
progressRollback: "#fff", // 进度条回滚颜色
progressTop: "3px", // 进度条距离顶部的距离
progressLeft: "0px", // 进度条距离左边的距离
UIViewBackground: "#fff", // 页面背景色
});
一旦你设置了插件,你就可以在组件中使用 $openScroll 和 $closeScroll() 方法:
第一种 inject
/* Step 3
------------------------------------------------------------------ */
// 💡 在父容器绑定类名
<div class="ProgressTopBar">
<p v-for="(item, index) in 1000" :key="index">{{ index + 1 }}</p>
</div>
import { ref, inject } from "vue";
import { scrollKey } from "vue3-progress-scroll";
inject<typeof scrollKey>(scrollKey).$openScroll();
inject<typeof scrollKey>(scrollKey).$closeScroll();
第二种 getCurrentInstance()
import { getCurrentInstance } from "vue";
const { proxy }: any = getCurrentInstance();
proxy.$openScroll();
proxy.$closeScroll();
<template>
<div class="ProgressTopBar">
<p v-for="(item, index) in items" :key="index">{{ item }}</p>
</div>
</template>
<script setup lang="ts">
// vue3.2.0+ 之后支持的新特性
defineOptions({
name: "scrollBar", // 组件名
inheritAttrs: false, // 是否继承父组件的属性
});
import { ref, inject } from "vue";
const items = ref<string[]>([]);
for (let i = 0; i < 200; i++) items.value.push(`Item ${i + 1}`);
import { scrollKey } from "vue3-progress-scroll";
inject<typeof scrollKey>(scrollKey).$openScroll();
inject<typeof scrollKey>(scrollKey).$closeScroll();
</script>
FAQs
🎉🎉🤖 `vue3-progress-scroll` 轻量版 滚动进度可视化插件, 融入 Vue3 Hooks, 更方便使用, 感受开发的乐趣 ~
We found that vue3-progress-scroll demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.