
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
@cxkit/version-vue
Advanced tools
Vue 3 adapter for @cxkit/version-core — version update notification with built-in UI components.
@cxkit 为 Vue 3 生态打造的高集成度、开箱即用的前端版本检测适配层。
利用 Vue 3 的 Composition API 和 Reactivity 响应式代理系统,将底层事件总线与组件数据无缝拉皮,省去了你监听重绘与手动同步缓存的成本。
npm install @cxkit/version-vue
initVersionUpdate(options)必须在使用任何组件与钩子前,在一处全局(例如 main.ts 或 App.vue setup 层)调用一次初始化。传入配置和 @cxkit/version-core 完全一致。
import { initVersionUpdate } from '@cxkit/version-vue'
initVersionUpdate({
pollInterval: 60 * 1000 * 5, // 每 5 分钟轮询检测一次 version.json
})
<VersionUpdateIndicator>我们内置并导出了一个极其美观、带一定进出场动画逻辑的 Vue 原生悬浮组件。只要将其引入到 Vue App 最外层视图树即可完成所有全自动打通。
<script setup>
import { VersionUpdateIndicator } from '@cxkit/version-vue'
import '@cxkit/version-vue/style.css'
</script>
<template>
<VersionUpdateIndicator
title="发现新版可用"
message="代码已重新打包发版,请立刻刷新以体验最新逻辑"
cancelText="取消"
confirmText="马上重载"
/>
<router-view />
</template>
useVersionUpdate()当且仅当你不想用内置的悬浮卡片 UI,需要引入 Ant Design 或是 Element Plus 自己包装 Dialog 时,可使用状态暴露接口进行极简开发。
import { useVersionUpdate, confirmVersionUpdate, deferVersionUpdate } from '@cxkit/version-vue'
import { ElDialog, ElButton } from 'element-plus'
const { hasPendingUpdate, latestVersion } = useVersionUpdate() // 完全 Reactive 支持!
<template>
<ElDialog v-model="hasPendingUpdate" title="更新可用">
<ElButton @click="confirmVersionUpdate">立刻自动刷新</ElButton>
<ElButton @click="deferVersionUpdate">推迟弹窗</ElButton>
</ElDialog>
</template>
详细接入流程请访问 官方开发文档。
FAQs
Vue 3 adapter for @cxkit/version-core — version update notification with built-in UI components.
The npm package @cxkit/version-vue receives a total of 21 weekly downloads. As such, @cxkit/version-vue popularity was classified as not popular.
We found that @cxkit/version-vue demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.