
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@bingoit/cms-desktop
Advanced tools
信息公告PC端,主要功能有:信息公告的发布、分类管理、标签管理、群组管理等;
npm install @bingoit/cms-desktop --save
直接引入信息公告导出的路由,并配置路由就可以使用了。
配置路由的实例代码如下所示:
import Vue from 'vue';
import Router from 'vue-router';
import { isNotEmpty } from '@bingoit/utils';
import { routerInterceptor, registerRouter, getParentRouteByPath } from '@bingoit/desktop-base/lib/router/helper';
import store from './store';
Vue.use(Router);
import CmsRoutes from '@bingoit/cms-desktop/lib/router';
let routeArray = [];
let cmsStaticRoutes = registerRouter(CmsRoutes);
let notMenuDynamicRouters = [];
//CMS路由有点特别:返回的路由中,除了静态路由,还有需要添加到子路由的非菜单路由
if(cmsStaticRoutes) {
cmsStaticRoutes.forEach(route => {
//判断是否需要添加到指定路由中;
// 指定了siblingPath参数的路由,需要添加到对应父路由的子路由中
if(isNotEmpty(route.siblingPath)) {
notMenuDynamicRouters.push(route);
} else {
routeArray.push(route);
}
});
}
const router = new Router({
routes: routeArray
});
//设置路由拦截;主要是登录拦截
routerInterceptor(router, store, routes => {
//当动态路由注册完成前,会执行该方法,继续处理动态路由
//注册非菜单的动态路由;如有些路由需要动态添加到指定路由的子路由中
if(notMenuDynamicRouters) {
notMenuDynamicRouters.forEach(route => {
let parentRoute = getParentRouteByPath(routes, route.siblingPath);
if(parentRoute) {
if(!parentRoute.children) {
parentRoute.children = new Array();
}
parentRoute.children.push(route);
}
})
}
});
export default router;
FAQs
信息公告PC端
We found that @bingoit/cms-desktop demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.