Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@bingoit/desktop-base
Advanced tools
定义PC端基础功能,如:登录功能,菜单功能等;
npm install @bingoit/desktop-base --save
需要依赖desktop-ui模块,所以使用时需要先引入“desktop-ui”:
import Vue from 'vue';
import BingoDesktopUI from '@bingoit/desktop-ui';
Vue.use(BingoDesktopUI);
使用时需要配置相关参数:
1.系统参数的配置
参数设置:如设置系统名称,logo地址,是否为调试模式,移动端域名等。
import {initSystem} from "@bingoit/desktop-base/lib/setting";
initSystem({
name: '测试系统名称 ',
logo: require('../../assets/logo.png'),
isDebug: true,
mobileDomain: ''
});
或
import DesktopBase from "@bingoit/desktop-base";
Vue.use(DesktopBase, {
name: '测试系统名称 ',
logo: require('../../assets/logo.png'),
isDebug: true,
mobileDomain: ''
})
2.设置Ajax请求
//设置ajax请求,返回结果为未登录状态时的处理方法
import {removeLoginState, removeUserInfo, removeToken, getToken} from "@bingoit/utils";
import { setTokenHandler, setNotLoginHandler } from "@bingoit/ajax";
setNotLoginHandler(this,function () {
removeLoginState();
removeUserInfo();
removeToken();
router.push('/login').then(() => {});
});
//设置token
setTokenHandler(this, function () {
return getToken();
});
3.配置Vuex(基础模块的Vuex导入);如:
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
import baseStoreOptions from '@bingoit/desktop-base/lib/store';
export default new Vuex.Store(baseStoreOptions);
4.设置路由及拦截器;如:
import Vue from 'vue';
import Router from 'vue-router';
import { routerInterceptor } from '@bingoit/desktop-base/lib/router/helper';
import store from '../store';
Vue.use(Router);
import BaseRouters from '@bingoit/desktop-base/lib/router';
let routeArray = BaseRouters;
const router = new Router({
routes: routeArray
});
//设置路由拦截
routerInterceptor(router, store);
export default router;
FAQs
PC端基础模块
We found that @bingoit/desktop-base 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.