
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.
platform-v2
Advanced tools
慧眼平台V2版本,基于Vue.js和Webpack构建的前端项目,支持中英文国际化。
yarn install
yarn dev 或 yarn start - 启动开发服务器yarn serve - 使用Vue CLI服务启动开发服务器yarn build - 构建生产版本yarn build:prod - 构建生产版本(别名)yarn build:dev - 构建开发版本yarn clean - 清理dist目录yarn lint - 运行ESLint检查代码yarn lint:fix - 运行ESLint并自动修复问题yarn format - 使用Prettier格式化代码yarn analyze - 分析打包结果yarn install:clean - 清理并重新安装依赖yarn update - 交互式更新依赖包项目支持中英文切换,通过以下方式控制:
localStorage控制:
// 设置为英文
localStorage.setItem('cutoverLanguage', 'en')
// 设置为中文
localStorage.setItem('cutoverLanguage', 'zh')
语言切换器:
src/i18n/index.js 中的 zhCN 对象src/i18n/index.js 中的 enUS 对象在 src/i18n/index.js 中添加新的翻译键值:
const zhCN = {
newKey: '中文翻译'
}
const enUS = {
newKey: 'English translation'
}
然后在组件中使用:
<template>
<div>{{ $t('newKey') }}</div>
</template>
src/
├── assets/ # 静态资源
│ └── imgs/ # 图片资源
├── i18n/ # 国际化配置
│ └── index.js # 语言包配置
├── index.js # 入口文件
├── index.vue # 主组件
├── LanguageSwitcher.vue # 语言切换组件
├── msgWebSocket.vue # WebSocket消息组件
├── g_bindvx.vue # 微信绑定组件
└── utils.js # 工具函数
yarn install 安装依赖yarn dev 启动开发服务器yarn build 构建生产版本yarn lint 和 yarn format 保持代码质量# 启动开发服务器
yarn dev
# 访问 http://localhost:8080 查看效果
# 先构建项目
yarn build:dev
# 然后直接在浏览器中打开 public/index.html 文件
项目使用 svg-sprite-loader 来处理 SVG 图标,支持动态颜色配置。
webpack.config.js 中配置了 svg-sprite-loadersrc/utils/svgIcons.js 自动导入所有 SVG 文件src/SvgIcon.vue 提供统一的 SVG 图标组件import SvgIcon from './SvgIcon.vue'
export default {
components: { SvgIcon }
}
<template>
<svg-icon icon-class="help_center" style="width: 24px; height: 24px; color: #409eff;" />
</template>
icon-class:SVG 文件名(不含 .svg 扩展名)className:额外的 CSS 类名color:颜色属性(也可使用 style 属性).svg-icon {
fill: currentColor;
transition: fill 0.3s ease;
}
.svg-icon:hover {
fill: #409eff;
}
项目中的 SVG 图标包括:
help_center - 帮助中心downsvg - 下载图标refresh - 刷新图标success - 成功图标await - 等待图标fail - 失败图标jumpTo - 跳转图标jumpToHover - 跳转悬停图标passwordView - 密码可见图标passwordeye - 密码隐藏图标访问 public/svg-demo.html 查看 SVG 图标演示和动态颜色效果。
FAQs
## 项目简介 慧眼平台V2版本,基于Vue.js和Webpack构建的前端项目,支持中英文国际化。
The npm package platform-v2 receives a total of 33 weekly downloads. As such, platform-v2 popularity was classified as not popular.
We found that platform-v2 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.