
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.
@twxx/admin-core
Advanced tools
共享 Vue 3 基础库,聚焦于:路由模块化与守卫、通用页面组件、主题与样式系统、工具函数与类型、可配置的安装与覆盖机制。
npm i @ls/admin-core
作为工作区依赖时,请在 peerDependencies 中保证:vue、pinia、vue-router、ant-design-vue 可用。
// main.ts
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { createRouter, createWebHistory } from 'vue-router';
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';
import { createCore, attachRouteGuards, mergeRoutes } from '@ls/admin-core';
const baseRoutes = [ /* 基础系统路由 */ ];
const systemRoutes = [ /* 业务路由 */ ];
const router = createRouter({ history: createWebHistory(), routes: mergeRoutes(baseRoutes, systemRoutes) });
const app = createApp(App);
app.use(createPinia());
app.use(router);
app.use(Antd);
attachRouteGuards(router, {
permissions: {
getToken: () => localStorage.getItem('token'),
hasPermission: (p) => p ? true : true,
whiteListPaths: ['/login']
}
});
app.use(createCore({
router,
theme: { primaryColor: '#13c2c2' },
components: { pageContainer: { padding: 16 } }
}));
app.mount('#app');
meta 中支持 title/roles/permissions/affix/hideInBreadcrumb。import { deriveRoutesFromModules, mergeRoutes } from '@ls/admin-core';
const modules = import.meta.glob('@/routes/modules/**/*.ts');
const systemRoutes = await deriveRoutesFromModules(modules as any);
const routes = mergeRoutes(baseRoutes, systemRoutes);
attachRouteGuards(router, { permissions }) 支持登录白名单、权限校验、标题设置。withDefaults)。onXxx 命名,双向绑定遵循 update:xxx。已内置:
PageContainer:页容器(标题/面包屑/工具栏插槽 + 内容)。AppBreadcrumb:基于路由 meta.title 生成。PermissionButton:带权限判定的按钮(包装 a-button)。src/styles/variables.less 定义 CSS 变量,并映射到 Less 变量。applyTheme(tokens) 设置 CSS 变量。getAntdModifyVars(tokens) 输出 modifyVars 用于 Vite 的 less 配置。deepMerge、storage、eventBus 等,均具名导出,便于按需引用与 Tree-shaking。CoreConfig:router、permissions、theme、components 等,使用 deepMerge 覆盖默认。applyTheme 切换主题。vite build(ESM/CJS + sourcemap)。vue/pinia/vue-router/ant-design-vue。semantic-release 自动版本与 CHANGELOG。FAQs
Shared Vue 3 core library: router, components, theme, utils
We found that @twxx/admin-core 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.