
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
jer-code-preview
Advanced tools
一个基于 Vite + Vue 3 的轻量代码预览组件库。
npm i jer-code-preview
# 或者
pnpm add jer-code-preview
# 或者
yarn add jer-code-preview
按需引入:
import { Preview } from 'jer-code-preview'
import 'jer-code-preview/style.css'
或作为插件安装:
import { createApp } from 'vue'
import PreviewPlugin from 'jer-code-preview'
import 'jer-code-preview/style.css'
const app = createApp(App)
app.use(PreviewPlugin)
app.mount('#app')
在组件中:
<script setup lang="ts">
import { Preview } from 'jer-code-preview'
import 'jer-code-preview/style.css'
const codeList = [
{ filename: 'button.vue', code: '<template>\\n <button>OK</button>\\n</template>' },
{ filename: 'utils.ts', code: 'export const add = (a:number, b:number)=>a+b' }
]
</script>
<template>
<Preview :codeList="codeList" />
</template>
codeList: { filename: string; code: string }[]# 本地开发
npm run dev
# 构建库(含类型)
npm run build
注意:该库将
vue声明为peerDependencies,请确保宿主项目安装了兼容版本的vue@^3.3。
MIT
FAQs
简单的代码预览组件(Vite + Vue 3)
We found that jer-code-preview 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.